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

fix(validate): no reusing root types #3453

Merged

Conversation

thomasheyenbrock
Copy link

Hello graphql-js folks 👋 While playing with schema and SDL validation, I noticed that the reference implementation does not follow the following rule from the latest spec:

The query, mutation, and subscription root types must all be different types if provided.

Not sure if that's an error in the spec or in the reference implementation 🤔 I went ahead and proposed a fix in here, but happy to open a PR on the spec instead if that's the preferred. This is after all a breaking change, even though I doubt that it would have a big impact. (At least I've never seen a schema that does this.)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 10, 2022

CLA Signed

The committers are authorized under a signed CLA.

src/type/validate.ts Outdated Show resolved Hide resolved
@saihaj saihaj requested a review from a team May 8, 2022 18:21
@netlify
Copy link

netlify bot commented May 9, 2022

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 095517a
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/627ac63690700800087bf6c5
😎 Deploy Preview https://deploy-preview-3453--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request May 10, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request May 10, 2022
IvanGoncharov added a commit that referenced this pull request May 10, 2022
@IvanGoncharov
Copy link
Member

@thomasheyenbrock Thanks for PR 👍
I applied review changes in 095517a

@IvanGoncharov IvanGoncharov added the PR: feature 🚀 requires increase of "minor" version number label May 10, 2022
@IvanGoncharov IvanGoncharov merged commit c008d0f into graphql:main May 10, 2022
@thomasheyenbrock thomasheyenbrock deleted the fix/no-reusing-root-types branch May 11, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature 🚀 requires increase of "minor" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants