Skip to content

Editorial: Clarify meta-fields in introspection #844

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 5 commits into from
Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions spec/Section 4 -- Introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ warnings.

## Type Name Introspection

GraphQL supports type name introspection at any point within a query by the
meta-field `__typename: String!` when querying against any Object, Interface,
or Union. It returns the name of the object type currently being queried.
GraphQL supports type name introspection within any selection set in an
operation, with the single exception of selections at the root of a subscription
operation. Type name introspection is accomplished via the meta-field
`__typename: String!` on any Object, Interface, or Union. It returns the name of
the concrete Object type at that point during execution.

This is most often used when querying against Interface or Union types to
identify which actual type of the possible types has been returned.
identify which actual Object type of the possible types has been returned.

This field is implicit and does not appear in the fields list in any defined type.
As a meta-field, `__typename` is implicit and does not appear in the fields list
in any defined type.


## Schema Introspection
Expand All @@ -110,8 +113,8 @@ __schema: __Schema!
__type(name: String!): __Type
```

These fields are implicit and do not appear in the fields list in the root type
of the query operation.
Like all meta-fields, these are implicit and do not appear in the fields list in
the root type of the query operation.

The schema of the GraphQL schema introspection system:

Expand Down