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

Add Appendix C - Built-in Definitions #1037

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

Conversation

martinbonnin
Copy link
Contributor

As we dive into full schemas, introspection and more (see #1036), I'd find it useful to have an authoritative source for built-in definitions that come with a GraphQL implementation (scalar, directives & introspection types).

It shows the built-in definition at a glance and makes it easy to diff, capture a change by looking at the git history. It's also nice for library authors because it uniformizes the descriptions.

The definitions are taken from graphql-js printIntrospectionSchema() with two small changes:

  • I added the scalars definitions manually
  • I carried over the __Type.fields, __Type.interface, etc... descriptions from the current spec comments

I was doing this for my own needs so figured out I might as well contribute it to the spec but I'm happy to move it somewhere else if you think this doesn't belong in the spec.

@netlify
Copy link

netlify bot commented Aug 5, 2023

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 59c3c62
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/64fb20d475a4a70007a20a0a
😎 Deploy Preview https://deploy-preview-1037--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 configuration.

@martinbonnin
Copy link
Contributor Author

Would that qualify as an editorial change?

The validation/execution behaviour is essentially unchanged. The main thing that could be considered a behaviour change is that the definitions proposed here contain descriptions. We could either:

  • Remove descriptions
  • Add language that mandates the implementations use the same description as in the spec
  • Add language that the implementations are free to change the description if they want
  • Leave as is

benjie
benjie previously requested changes Sep 8, 2023
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this to just adding the appendix, it does not need to be referenced in the spec text (just as Appendix B is not referenced when grammar is mentioned).

spec/Section 4 -- Introspection.md Outdated Show resolved Hide resolved
spec/Section 3 -- Type System.md Outdated Show resolved Hide resolved
@benjie benjie dismissed their stale review October 4, 2023 14:23

Suggested changes were adopted.

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