Skip to content

Editorial: Improve Introspection section #857

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

Merged
merged 4 commits into from
May 14, 2021
Merged

Conversation

leebyron
Copy link
Collaborator

@leebyron leebyron commented Apr 22, 2021

This makes some structural changes to the introspection section and fills in some missing pieces (solved ambiguity):

  • Removes 4-level headers in favor of sub-section headers
  • Uses the same syntax and style for describing fields of all types
  • Defines the __Schema type which was previously under-defined
  • Defines the two enums (__TypeKind and __DirectiveLocation) which were previously under-defined.
  • Clarifies the __ restriction and repeats this when defining Name
  • Moves Documentation and Description sub-sections into schema introspection section.

Closes #827

@leebyron leebyron added ✏️ Editorial PR is non-normative or does not influence implementation 🤷‍♀️ Ambiguity An issue/PR which identifies or fixes spec ambiguity labels Apr 22, 2021
@leebyron leebyron added this to the May2021 milestone Apr 22, 2021

**Schema Introspection Schema**

The schema introspection system is itself, of course, represented as a GraphQL
Copy link
Contributor

@sungam3r sungam3r Apr 23, 2021

Choose a reason for hiding this comment

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

is itself, of course, represented as a GraphQL schema

IMO this creates a sustainable impression that the schemа, of course, can be expandable and tooling should take it into account.

Fields\:

* `description` may return a String or {null}.
* `queryType` is the root type of a query operation, if supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

if supported. Otherwise {null}.

WOW! It seemed to me that discussions of the optional queryType were about the fact that it is required for introspection, so it should always be? Did I miss something?

Copy link
Member

Choose a reason for hiding this comment

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

Yes indeed, that one seems new :) @leebyron did you intend to make it nullable or is it a copy pasta? Until now a query type was mandatory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Definitely a mistake, thank you for the careful read!

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.

Some really great improvements to the text here 👍

leebyron and others added 4 commits May 14, 2021 10:05
This makes some structural changes to the introspection section and fills in some missing pieces (solved ambiguity):

* Removes 4-level headers in favor of sub-section headers
* Uses the same syntax and style for describing fields of all types
* Defines the `__Schema` type which was previously under-defined
* Defines the two enums (`__TypeKind` and `__DirectiveLocation`) which were previously under-defined.
* Clarifies the `__` restriction and repeats this when defining `Name`
* Moves Documentation and Description sub-sections into schema introspection section.
@leebyron leebyron force-pushed the editorial-introspection branch from 0d8a86d to 406bc4d Compare May 14, 2021 17:11
@leebyron leebyron requested a review from benjie May 14, 2021 17:12
@leebyron
Copy link
Collaborator Author

Great suggestions @benjie - incorporated

@leebyron leebyron merged commit 50bbaa8 into main May 14, 2021
@leebyron leebyron deleted the editorial-introspection branch May 14, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♀️ Ambiguity An issue/PR which identifies or fixes spec ambiguity ✏️ Editorial PR is non-normative or does not influence implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about reserved names
4 participants