graphql-go icon indicating copy to clipboard operation
graphql-go copied to clipboard

Fail to parse empty field lists for Object, Interface, and Input Object types

Open vergenzt opened this issue 7 years ago • 1 comments

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!

vergenzt avatar Nov 19 '17 08:11 vergenzt

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.

pavelnikolov avatar May 10 '18 10:05 pavelnikolov