-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subgraph Composition : Fix graph init for composed subgraphs #1920
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 40dbe07 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 Cloudflare Pages
|
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove
hidden: true
from--ipfs
flag 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
--from-source-subgraph
is fine by me, but wouldn't--from-subgraph
be more concise? "source" seems redundant. -
If you don't specify
--start-block
in 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.
@@ -596,9 +656,14 @@ async function processInitForm( | |||
isSubstreams || | |||
(!protocolInstance.hasContract() && !isComposedSubgraph), | |||
initial: initContract, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you specify --from-source-subgraph Qmxxxxxx
, this field should have initial value Qmxxxxxx
This PR enables
graph init
for composed subgraphs. It creates a new ipfs client to validate the source subgraph manifest