Deploying query services using Graph Indexer
Here we will introduce how to quickly build a graph-indexer.
Prepare the environment
Install JDK(Requires JDK11 and above)
brew install openjdk@11sudo yum install java-11-openjdk-develCheck the installation:
java -versionInstall nodejs
To complete this tutorial successfully, you must have Node.js installed on your machine.
Install Node.js with NVM
Install jena-fuseki
Install and run:
wget https://dlcdn.apache.org/jena/binaries/apache-jena-fuseki-4.7.0.tar.gz
tar xvf apache-jena-fuseki-4.7.0.tar.gz
cd apache-jena-fuseki-4.7.0
sh fuseki-serverCreate a dataset
You can access http://localhost:3030, and create a demo dataset(Figure 1-1, Figure 1-2)


A simple Graph Indexer
Here, we will use Node.js to accomplish this process.
This example will listen to RDF data on the Mumbai network, between blocks 32362681 and 32362699.
Create a new project and install the
ethers (v5),axios, andqs.
Create an
app.jsfile with the following content:
Run the Graph Indexer
After the data has been inserted, it can be queried at http://localhost:3030/#/dataset/demo/query.

Last updated