Skip to content

Commit 6f187fa

Browse files
Shane32benjie
andauthored
Apply suggestions from code review
Co-authored-by: Benjie <[email protected]>
1 parent 0f283f9 commit 6f187fa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/Section 5 -- Validation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -332,20 +332,20 @@ contain any number of operations, each of which may contain different root
332332
fields. When executed, a document containing multiple subscription operations
333333
must provide the operation name as described in {GetOperation()}.
334334

335-
### Operation Type Configuration
335+
### Operation Type Exists
336336

337337
#### Formal Specification
338338

339339
For each operation definition in the document:
340340

341-
- Let {operationType} be the type of the operation (query, mutation, or subscription).
342-
- The corresponding type for {operationType} must be defined in the schema.
341+
- Let {operationType} be the type of the operation (`query`, `mutation`, or `subscription`).
342+
- The corresponding _root operation type_ for {operationType} must be defined in the schema.
343343

344344
#### Explanatory Text
345345

346-
The schema must be properly configured to handle mutation and subscription operation
347-
types. This ensures that when a mutation or subscription operation is defined in the
348-
document, the schema includes the appropriate type to handle these operations.
346+
A schema defines the root operation types that it supports. Any document that
347+
contains an operation of a type unsupported by the schema is invalid, since such
348+
an operation cannot be executed.
349349

350350
While query operations are required for all schemas, mutation and subscription operations
351351
are optional. If the schema does not include the necessary type for a mutation or subscription
@@ -354,7 +354,7 @@ operation defined in the document, it will be considered invalid.
354354
For example, the following document is valid if the schema includes a Mutation type, but
355355
invalid if it does not:
356356

357-
```graphql
357+
```graphql example
358358
mutation {
359359
likeStory(storyID: 12345) {
360360
story {

0 commit comments

Comments
 (0)