graphql-go
graphql-go copied to clipboard
Fail to parse empty field lists for Object, Interface, and Input Object types
Per the spec, Object, Interface, and Input Object types must define at least one field. This commit makes graphql-go fail to parse any of these types if no fields are defined.
The first three commits are some refactors that I thought may help with clarity. Only the last makes any observable behavior change.
Let me know what you think!
Thanks! I think this PR has to, actually, be split into 2 PRs. One for refactoring and another one to add validation for these types. This would make it much cleaner and would increase the chances of getting it merged. There are also conflicts to be resolved.