Skip to content

Servers must preserve lexical ordering between SDL and introspection #673

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

spawnia
Copy link
Member

@spawnia spawnia commented Jan 13, 2020

Resolves #577

This change adds the proposed addition by @leebyron from #577 (comment)

@IvanGoncharov IvanGoncharov added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label May 30, 2020
Base automatically changed from master to main February 3, 2021 04:50
@leebyron leebyron force-pushed the main branch 4 times, most recently from e5d241d to 6c81ed8 Compare April 23, 2021 19:15
@netlify
Copy link

netlify bot commented Jun 16, 2022

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 6e3d2d3
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/62ab5e331bd50200093292d4
😎 Deploy Preview https://deploy-preview-673--graphql-spec-draft.netlify.app/draft
📱 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.

@benjie
Copy link
Member

benjie commented Jun 16, 2022

I approve of the intent behind this. It doesn't feel like putting the current proposed edit in chapter 4 is quite right though. We have effectively this global rule:

The order of fields, arguments, etc in a GraphQL schema is significant

Then that comes with two corollaries:

  1. The order of fields, arguments, etc in SDL is significant - when building a schema from SDL these orders should be maintained.
  2. The order of fields, arguments, etc in introspection is significant - when introspecting the schema these orders should be maintained.

(1) Should be in section 3 ("Type System"), whereas (2) should be in section 4 ("Introspection"). I think (2) should come under each of the Fields: prompts, e.g.

  • fields must return the set of fields that can be selected for this type.
    • Accepts the argument includeDeprecated which defaults to false. If true, deprecated fields are also returned.
    • Fields must be returned in the order in which they are defined in the schema

Similar localised edits should be made in section 3 I think. I'm not sure where the global rule belongs exactly, it could be that section 3 covers it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is the order of argument definitions significant?
3 participants