File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Query The Graph's gateway with automatic payment handling using the [ x402 protocol] ( https://github.com/coinbase/x402 ) , no API key required!
44
5- ## Installation
6-
7- ``` bash
8- npm install @graphprotocol/client-x402
9- ```
10-
115## Environments
126
137| Environment | Gateway endpoint | Payment network |
@@ -21,12 +15,12 @@ Three ways to use this package, from simplest to most complete:
2115
2216### 1. CLI
2317
24- For quick queries, testing, or shell scripts. No code required.
18+ For quick queries, testing, or shell scripts. No install required.
2519
2620``` bash
2721export X402_PRIVATE_KEY=0xabc123...
2822
29- graphclient -x402 " { pairs(first: 5) { id } }" \
23+ npx @graphprotocol/client -x402 " { pairs(first: 5) { id } }" \
3024 --endpoint https://gateway.thegraph.com/api/x402/subgraphs/id/< SUBGRAPH_ID> \
3125 --chain base
3226```
@@ -35,6 +29,10 @@ graphclient-x402 "{ pairs(first: 5) { id } }" \
3529
3630For scripts, bots, or simple integrations. No build step, no types.
3731
32+ ``` bash
33+ npm install @graphprotocol/client-x402
34+ ```
35+
3836``` typescript
3937import { createGraphQuery } from ' @graphprotocol/client-x402'
4038
You can’t perform that action at this time.
0 commit comments