Subsquid: Querying NFT Data using Subsquid and a Filebase IPFS Dedicated Gateway
Learn how to use Subsquid to query NFT data using a Filebase IPFS dedicated gateway.
What is Subsquid?
Subsquid is a comprehensive blockchain indexing solution that features an open-source SDK, dedicated data lakes (Archives) for on-chain data, and a hosted service (Aquarium). The indexing stack separates data ingestion from transformation and presentation, where Archives handle on-chain data ingestion and Squids handle the data processing and presentation. Squids, built using the open-source Squid SDK, are Extract-Transform-Load-Query projects that gather historical on-chain data, process it with a user-defined processor, and present it in real-time.
Read below to learn how to use Subsquid to query NFT data using a Filebase IPFS dedicated gateway.
1. Start by cloning the following repository:
git clone https://github.com/RaekwonIII/bored-ape-yacht-club-indexing.git
This repo was made by a member of the Subsquid team as an example showcasing how to index NFT data for the Bored Ape Yacht Club collection by fetching the metadata from IPFS. We’ll edit it slightly to use a Filebase dedicated IPFS gateway.
2. After downloading the repo, open the src/processor.ts file in your preferred text editor of choice. Edit line 21 to reflect the following:
src/processor.ts file in your preferred text editor of choice. Edit line 21 to reflect the following:baseURL: "https://gateway-name.myfilebase.com",,
Replace gateway-name with your Filebase IPFS dedicated gateway name.
Overall, the src/processor.ts file should look like this:
3. Next, navigate into the cloned repository’s directory. Install the project’s dependencies using the following command:
npm i
4. Then, build the project with the command:
sqd build
5. Launch the database Docker container with the following command:
sqd up
6. Then, launch the processor with the command:
sqd process
The terminal will begin to generate consistent output. It should resemble the following:

In this output, you can see your IPFS dedicated gateway being used as the base URL.
7. Next, in a new terminal window, launch the GraphQL server with the command:
sqd serve
8. Then you can access the GraphiQL Playground by running the command:
sqd open http://localhost:4350/graphql
9. From your browser, you can query different pieces of information about the Bored Ape Yacht Club NFT collection.

Last updated
Was this helpful?