graphql-js
0254e5f2 - Cover empty field-selections (#4228)

Commit
1 year ago
Cover empty field-selections (#4228) Closes https://github.com/graphql/graphql-js/issues/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.
Author
Parents
Loading