Skip to content

Commit c36c6db

Browse files
committed
additional operation name uniqueness validation example
Previously we didn't have an example with 2 operation that have the same name, but different type, so it wasn't clear that it is also invalid.
1 parent 89475ac commit c36c6db

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/Section 5 -- Validation.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ query getName {
120120
}
121121
```
122122

123+
It is invalid even if the type of each operation is different:
124+
125+
```!graphql
126+
query dogOperation {
127+
dog {
128+
name
129+
}
130+
}
131+
132+
mutation dogOperation {
133+
mutateDog {
134+
id
135+
}
136+
}
137+
```
138+
123139
### Anonymous Operation Definitions
124140

125141
#### Lone Anonymous Operation

0 commit comments

Comments
 (0)