Commit 0254e5f
authored
Cover empty field-selections (#4228)
Closes #3790
This follows the spec closer to the letter as we consider empty
selection-sets invalid as well. This however does not cover empty
operation-definitions, which should also be considered invalid.
The parser itself considers empty-selections invalid as it requires you
to specify a name before a closing curly, hence why testing happens a
bit more manual here. Despite our parser not considering this valid, I
think this is good to validate when folks use a separate parser or
construct documents manually as this is valid in our type-system.1 parent 89f23d1 commit 0254e5f
File tree
2 files changed
+50
-1
lines changed- src/validation
- __tests__
- rules
2 files changed
+50
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| 10 | + | |
4 | 11 | | |
5 | | - | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
38 | 78 | | |
39 | 79 | | |
40 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
0 commit comments