Skip to content

Projects includes how to query data from subgraph from https endpoint with schema.

Notifications You must be signed in to change notification settings

Sufiyan-dev/QuerySubgrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Query Data From Subgraph

In following projects includes two files for diffrent purposes

  1. query.js - Runs only one time and quries all the data
  2. queryContinuous.js - Runs continuosly and wait for 14sec after quering again

Dependecies

Well there are many was of querying data from subgraph, but i have use https endpoint way with axios.

  • axios

Steps to run

  1. Install all the dependencies
    npm install
    
  2. Adding you subgraph https endpoint in both files
    const uniswapURL =  <-Change-It-Here->
    
  3. Changing schema accordingly, depending upon what data to get NOTE : _meta in schema is to get the current block in file queryContinous.js
  4. Running it
    node <FileName>
    

Author

Sufiyan

About

Projects includes how to query data from subgraph from https endpoint with schema.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published