non-fungible-apps/subgraph/examples/query
Shredder 61aeaaae66
feat: subgraph setup for the FleekNFA contracts (#72)
* Add verify script and update hardhat config to automate all future code verifications on polygonscan

* Update deployments to match the new deployed instance of the contract on polygon mumbai testnet (verified)

* feat: Generate the base of the subgraph by graph-cli based on the verified deployed instance on mumbai

* bug: fixed type errors in the typescript specification file.

* chore: generate a new build of the subgraph

* feat: write a script to perform multiple types of queries on the subgraph

* docs: Write a README for the query-examples directory to guide users on how they can perform queries

* chore: remove the heavy subgraph generated WASM and add all .WASM files to .gitignore

* chore: apply the requested changes from Zoruka on the verify_polyscan.js file

* docs: write the readme doc for the subgraph

* chore: remove deploy from package.json and add build, abis, and generated to .gitignore

* chore: remove abis, build, and generated from the branch

* chore: move query-examples to examples/query/ and gitignore .graphclient

* docs: update readme (add a section for developing and describe build and generated directories better)

* chore: remove graphql from the root package.json file
2023-01-31 18:29:42 +03:30
..
.graphclientrc.yml feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30
README.md feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30
main.ts feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30
package.json feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30
queries.graphql feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30
yarn.lock feat: subgraph setup for the FleekNFA contracts (#72) 2023-01-31 18:29:42 +03:30

README.md

Query Examples

This directory contains a TypeScript app that performs queries on the deployed subgraph instance of the Fleek NFA.

How to run

Prerequisites

In order to run the app, the following dependencies are required:

  • yarn
  • NPM
  • ts-node

Running the TypeScript app

To launch the TypeScript app, you need to install all dependencies that come with it: yarn or npm install

After doing so, you can run the app by executing the following command: npx ts-node main.ts

Tweaking the queries

As previously mentioned, all queries' GraphQL form can be found in the queries.graphql file.

By following The Graph's Querying Documentation, you can change the queries or add new ones as you desire.

The next thing you need to do after changing the file, is generating the TypeScript format of them by running the following commands:

# if you already have graphclient installed, skip the first command.
yarn add -D @graphprotocol/client-cli
yarn graphclient build

After generating the new TypeScript query specification files, you can change the main.ts script to execute the new queries.