Subgraph Composition : Fix graph init for composed subgraphs#1920
Subgraph Composition : Fix graph init for composed subgraphs#1920YaroShkvorets merged 22 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 36cf7e3 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 |
55c1f2b to
111a264
Compare
Deploying graph-tooling with
|
| Latest commit: |
36cf7e3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c2beb640.graph-tooling.pages.dev |
| Branch Preview URL: | https://krishna-comp-fixes.graph-tooling.pages.dev |
|
@incrypto32 could you fix the linter error? |
|
I think there are some issues with running github actions in your branch after #1919 Rebasing on top of the latest main should help. |
8e5191c to
2a7cf51
Compare
2a7cf51 to
7efc3f2
Compare
|
@YaroShkvorets i just rebase on top of main and the issue persists. I cant figure out what the lint issue is, also im not able to run the lint locally. Getting these error |
7efc3f2 to
3a75a7f
Compare
|
Looks like it's passing. Good for review now? |
|
@YaroShkvorets yes, ready for review |
YaroShkvorets
left a comment
There was a problem hiding this comment.
- Remove
hidden: truefrom--ipfsflag on line 117 - There doesn't seem to be a way to scaffold a subgraph-based subgraph in non-interactive way from command line. Is it possible?
- this command does nothing and exits with code 0 without any error:
graph init test test --from-contract=0x0 --protocol=subgraph --network=mainnet
e5a3df7 to
a074696
Compare
|
@YaroShkvorets just addressed the comments, the CI is failing but i think its not related to the code. |
|
@incrypto32 A couple of things:
|
|
@YaroShkvorets I just added the support for non interactive mode and addressed the other comments too. |
There was a problem hiding this comment.
-
--from-source-subgraphis fine by me, but wouldn't--from-subgraphbe more concise? "source" seems redundant. -
If you don't specify
--start-blockin non-interactive mode, it goes withundefined:
❯ graph init usdt usdt --from-source-subgraph QmaNwrB6x9oiB2NZkbPsSjkCWhMT7gzH3NKYR8ESYpcyNW --protocol subgraph --network mainnet
Generate subgraph
Write subgraph to directory
✔ Create subgraph scaffold
✔ Initialize subgraph repository
✔ Install dependencies with yarn
✖ Failed to generate code from ABI and GraphQL schema: Command failed: yarn codegen
- Apply migrations
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
- Apply migrations
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
- Apply migrations
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
- Apply migrations
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
- Apply migrations
Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
- Apply migrations
Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
- Apply migrations
Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
- Apply migrations
✔ Apply migrations
- Load subgraph from subgraph.yaml
✖ Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:
Path: dataSources > 0 > source > startBlock
Expected BigInt, found string:
undefined
error Command failed with exit code 1.
…ooling into krishna/comp-fixes
There was a problem hiding this comment.
Pushed a commit to fix protocol validation. The rest looks good. Flag validation is getting out of hand for this command. Created an issue to address it separately: #1952
One last thing, let's add a test to init.test.ts
4c5d300 to
dbaea17
Compare
|
Wonder why CI workflows are not running. Works for other PRs. |
This PR enables
graph initfor composed subgraphs. It creates a new ipfs client to validate the source subgraph manifest