Skip to content

Commit 6ce5c70

Browse files
committed
Merge pull request #13 from dittos/patch-1
Make fragment syntax consistent
2 parents e5ca11a + bf21180 commit 6ce5c70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Section 5 -- Validation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fragment interfaceFieldSelection on Pet {
9090
and the following is invalid:
9191

9292
```!graphql
93-
fragment definedOnImplementorsButNotInterface : Pet {
93+
fragment definedOnImplementorsButNotInterface on Pet {
9494
nickname
9595
}
9696
```
@@ -102,11 +102,11 @@ implementors of the union define the fieldName.
102102
For example the following is invalid
103103

104104
```graphql
105-
fragment directFieldSelectionOnUnion : CatOrDog {
105+
fragment directFieldSelectionOnUnion on CatOrDog {
106106
directField
107107
}
108108

109-
fragment definedOnImplementorsQueriedOnUnion : CatOrDog {
109+
fragment definedOnImplementorsQueriedOnUnion on CatOrDog {
110110
name
111111
}
112112
```
@@ -753,7 +753,7 @@ possible types of the scope and the spread, the spread is considered valid.
753753
So for example
754754

755755
```graphql
756-
fragment unionWithInterface Pet { ...dogOrHumanFragment }
756+
fragment unionWithInterface on Pet { ...dogOrHumanFragment }
757757
fragment dogOrHumanFragment on DogOrHuman { ... on Dog { barkVolume } }
758758
```
759759

0 commit comments

Comments
 (0)