diff --git a/spec/Section 4 -- Introspection.md b/spec/Section 4 -- Introspection.md index 889db030e..853da694e 100644 --- a/spec/Section 4 -- Introspection.md +++ b/spec/Section 4 -- Introspection.md @@ -98,6 +98,8 @@ identify which actual type of the possible types has been returned. This field is implicit and does not appear in the fields list in any defined type. +Note: `__typename` may not be included as a root field in a subscription +operation. ## Schema Introspection diff --git a/spec/Section 5 -- Validation.md b/spec/Section 5 -- Validation.md index b855de085..285f72073 100644 --- a/spec/Section 5 -- Validation.md +++ b/spec/Section 5 -- Validation.md @@ -249,7 +249,8 @@ query getName { * Let {variableValues} be the empty set. * Let {groupedFieldSet} be the result of {CollectFields(subscriptionType, selectionSet, variableValues)}. -* {groupedFieldSet} must have exactly one entry. +* {groupedFieldSet} must have exactly one entry, which must not be an + introspection field. **Explanatory Text** @@ -305,14 +306,11 @@ fragment multipleSubscriptions on Subscription { } ``` -Introspection fields are counted. The following example is also invalid: +The root field of a subscription operation must not be an introspection field. +The following example is also invalid: ```graphql counter-example subscription sub { - newMessage { - body - sender - } __typename } ```