Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vergenzt
Copy link

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!

@pavelnikolov
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants