Skip to content
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

feat: validate graphql schema at build time #1544

Closed
wants to merge 2 commits into from
Closed

feat: validate graphql schema at build time #1544

wants to merge 2 commits into from

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Dec 13, 2023

we want to run GraphQL Schema validations at the build time to crash early

Copy link

cloudflare-workers-and-pages bot commented Dec 13, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7439f34
Status: ✅  Deploy successful!
Preview URL: https://3ee20ec5.graph-tooling.pages.dev
Branch Preview URL: https://saihaj-1364.graph-tooling.pages.dev

View logs

Copy link

changeset-bot bot commented Dec 13, 2023

🦋 Changeset detected

Latest commit: 7439f34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

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

Copy link
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphprotocol/graph-cli 0.64.0-alpha-20231213180901-055b47e npm ↗︎ unpkg ↗︎

@YaroShkvorets
Copy link
Collaborator

@saihaj any reason this was abandoned as draft?

@saihaj
Copy link
Member Author

saihaj commented Dec 17, 2024

@saihaj any reason this was abandoned as draft?

Hey @YaroShkvorets so if you see the META_SCHEMA_GRAPH_NODE there were some fix needed for schema in graph-node I don't think my PR ever got merged. Also this required some more testing.

We also need a reliably way to pin to a graph-node version that a user will deploy to. There can be features from graph-node that user is trying to use in the subgraph but are not available in a release. So the approach of pinning to master on GitHub won't work. I think better would be looking at manifests and then creating URL for META_SCHEMA_GRAPH_NODE.

So that is one reason it was stranded. Then we also had bunch of discussions and exploration of solving this issue via the NAPI (or similar tool) initiative. Where graph-node would publish a common crate that can be used within CLI so we use same function graph-node uses and provide much more detailed error info.

reflecting back I think better the former approach (the one this PR takes) is probably the best. Then in future figure out NAPI (we have PR that should be able to land after some extensive testing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants