Conversation
🦋 Changeset detectedLatest commit: a1fd202 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying graph-tooling with
|
| Latest commit: |
a1fd202
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f22ca8da.graph-tooling.pages.dev |
| Branch Preview URL: | https://yaro-ipfs-endpoints.graph-tooling.pages.dev |
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphprotocol/graph-cli |
0.97.2-alpha-20250624170459-a1fd202ebba468eab0be9ebd3207a0620d93e321 |
npm ↗︎ unpkg ↗︎ |
@graphprotocol/graph-ts |
0.38.2-alpha-20250624170459-a1fd202ebba468eab0be9ebd3207a0620d93e321 |
npm ↗︎ unpkg ↗︎ |
| // If it's an IPFS hash (Qm...) | ||
| if (source.startsWith('Qm')) { | ||
| const response = await fetch(`${DEFAULT_IPFS_URL}/cat?arg=${source}`); | ||
| const response = await fetch(`${getGraphIpfsUrl().ipfsUrl}/cat?arg=${source}`); |
There was a problem hiding this comment.
This is wrong. The /api/v0/cat endpoint is a POST endpoint and only works with GET atm. due to backwards compatibility. All GET requests should go to /ipfs/{cid}.
| @@ -1,3 +1,47 @@ | |||
| const DEFAULT_IPFS_URL = 'https://api.thegraph.com/ipfs/api/v0' as const; | |||
| const DEFAULT_IPFS_URL = 'https://ipfs.thegraph.com/ipfs/api/v0' as const; | |||
There was a problem hiding this comment.
The IPFS URL should just be https://ipfs.thegraph.com
For GET requests (read a file), you'd append /ipfs/{cid}.
For POST requests (adding a file) you'd append /api/v0/add
| target: { | ||
| ...a.target, | ||
| value: `https://api.thegraph.com/ipfs/api/v0/cat?arg=${ipfsHash}`, | ||
| value: `https://ipfs.thegraph.com/ipfs/api/v0/cat?arg=${ipfsHash}`, |
There was a problem hiding this comment.
This should point to the IPFS Gateway GET URL (https://ipfs.thegraph.com/ipfs/${ipfsHash}) and use a GET request
|
|
||
| const ipfsClient = create({ | ||
| url: 'https://api.thegraph.com/ipfs/api/v0', | ||
| url: 'https://ipfs.thegraph.com/ipfs/api/v0', |
There was a problem hiding this comment.
There's no /ipfs/api/v0 (we only allow that atm. for backwards compatibility reasons). This should just be https://ipfs.thegraph.com/api/v0 if the client expects the full Kubo RPC path.
| description: subgraphManifest?.parsed.description, | ||
| subgraphImage: | ||
| 'https://api.thegraph.com/ipfs/api/v0/cat?arg=QmdSeSQ3APFjLktQY3aNVu3M5QXPfE9ZRK5LqgghRgB7L9', | ||
| 'https://ipfs.thegraph.com/ipfs/api/v0/cat?arg=QmdSeSQ3APFjLktQY3aNVu3M5QXPfE9ZRK5LqgghRgB7L9', |
There was a problem hiding this comment.
a) There's no https://ipfs.thegraph.com/ipfs/api/v0
b) This should use the IPFS Gateway URL anyways: https://ipfs.thegraph.com/ipfs/QmdSeSQ3APFjLktQY3aNVu3M5QXPfE9ZRK5LqgghRgB7L9
| "create": "graph create example --node https://api.studio.thegraph.com/deploy/", | ||
| "create-local": "graph create example --node http://127.0.0.1:8020", | ||
| "deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/", | ||
| "deploy": "graph deploy example --ipfs https://ipfs.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/", |
There was a problem hiding this comment.
This (and all other package.json's below) should use --ipfs https://ipfs.thegraph.com
https://ipfs.thegraph.com/ipfs/api/v0