0.0.0 • Published 2 years ago
@genql/thegraph v0.0.0
thegraph.com TypeScript API client
GraphQL client for thegraph.com with full TypeScript support
Installation
npm install @genql/thegraph
Docs
You can read more about usage in the client docs and Genql docs
Example usage
import { createClient } from '@genql/thegraph'
const client = createClient()
// query variables
let subgraphId = ''
client
.query({
apiVersions: {
__args: {
subgraphId: subgraphId,
},
version: true,
},
})
.then((x) => console.log(JSON.stringify(x, null, 4)))
// query variables
let blockHash
let network = ''
client
.query({
blockData: {
__args: {
blockHash: blockHash,
network: network,
},
},
})
.then((x) => console.log(JSON.stringify(x, null, 4)))
Sponsor
This project is sponsored by Notaku: Create public docs websites from your Notion pages
0.0.0
2 years ago