Skip to content

Commit f474e66

Browse files
leebyronbenjie
andauthored
Editorial: Clarify meta-fields in introspection (#844)
* Editorial: Clarify meta-fields in introspection Derived from #777 Renames "field" to "meta-field" consistently. Adds "with the single exception of the subscription root operation type". Clarifies some language. * Update spec/Section 4 -- Introspection.md Co-authored-by: Benjie Gillam <benjie@jemjie.com> * Update spec/Section 4 -- Introspection.md Co-authored-by: Benjie Gillam <benjie@jemjie.com> * Update spec/Section 4 -- Introspection.md Co-authored-by: Benjie Gillam <benjie@jemjie.com> * wrap Co-authored-by: Benjie Gillam <benjie@jemjie.com>
1 parent f8b75d3 commit f474e66

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

spec/Section 4 -- Introspection.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,17 @@ warnings.
8989

9090
## Type Name Introspection
9191

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

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

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

101104

102105
## Schema Introspection
@@ -110,8 +113,8 @@ __schema: __Schema!
110113
__type(name: String!): __Type
111114
```
112115

113-
These fields are implicit and do not appear in the fields list in the root type
114-
of the query operation.
116+
Like all meta-fields, these are implicit and do not appear in the fields list in
117+
the root type of the query operation.
115118

116119
The schema of the GraphQL schema introspection system:
117120

0 commit comments

Comments
 (0)