Skip to content

Commit 08abf49

Browse files
benjiemichaelstaib
andauthored
Apply suggestions from code review
Co-authored-by: Michael Staib <[email protected]>
1 parent e8f6145 commit 08abf49

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spec/Section 5 -- Validation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ field must not be {null}.
14921492
An empty Oneof Input Object is invalid.
14931493

14941494
```graphql counter-example
1495-
query addPet {
1495+
mutation addPet {
14961496
addPet(pet: {}) {
14971497
name
14981498
}
@@ -1502,23 +1502,23 @@ query addPet {
15021502
Multiple fields are not allowed.
15031503

15041504
```graphql counter-example
1505-
query addPet($cat: CatInput, $dog: DogInput) {
1505+
mutation addPet($cat: CatInput, $dog: DogInput) {
15061506
addPet(pet: {cat: $cat, dog: $dog}) {
15071507
name
15081508
}
15091509
}
15101510
```
15111511

15121512
```graphql counter-example
1513-
query addPet($dog: DogInput) {
1513+
mutation addPet($dog: DogInput) {
15141514
addPet(pet: { cat: { name: "Brontie" }, dog: $dog }) {
15151515
name
15161516
}
15171517
}
15181518
```
15191519

15201520
```graphql counter-example
1521-
query addPet {
1521+
mutation addPet {
15221522
addPet(pet: { cat: { name: "Brontie" }, dog: null }) {
15231523
name
15241524
}
@@ -1529,15 +1529,15 @@ query addPet {
15291529
Variables used for Oneof Input Object fields must be non-nullable.
15301530

15311531
```graphql example
1532-
query addPet($cat: CatInput!) {
1532+
mutation addPet($cat: CatInput!) {
15331533
addPet(pet: { cat: $cat }) {
15341534
name
15351535
}
15361536
}
15371537
```
15381538

15391539
```graphql counter-example
1540-
query addPet($cat: CatInput) {
1540+
mutation addPet($cat: CatInput) {
15411541
addPet(pet: { cat: $cat }) {
15421542
name
15431543
}
@@ -1549,15 +1549,15 @@ If a field with a literal value is present then the value must
15491549
not be {null}.
15501550

15511551
```graphql example
1552-
query addPet {
1552+
mutation addPet {
15531553
addPet(pet: { cat: { name: "Brontie" } }) {
15541554
name
15551555
}
15561556
}
15571557
```
15581558

15591559
```graphql counter-example
1560-
query addPet {
1560+
mutation addPet {
15611561
addPet(pet: { cat: null }) {
15621562
name
15631563
}

0 commit comments

Comments
 (0)