-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
spec/Section 4 -- Introspection.md
Outdated
|
||
**Schema Introspection Schema** | ||
|
||
The schema introspection system is itself, of course, represented as a GraphQL |
There was a problem hiding this comment.
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.
spec/Section 4 -- Introspection.md
Outdated
Fields\: | ||
|
||
* `description` may return a String or {null}. | ||
* `queryType` is the root type of a query operation, if supported. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
e5d241d
to
6c81ed8
Compare
There was a problem hiding this 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 👍
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.
Co-authored-by: Ivan Maximov <[email protected]>
0d8a86d
to
406bc4d
Compare
Great suggestions @benjie - incorporated |
This makes some structural changes to the introspection section and fills in some missing pieces (solved ambiguity):
__Schema
type which was previously under-defined__TypeKind
and__DirectiveLocation
) which were previously under-defined.__
restriction and repeats this when definingName
Closes #827