Skip to content

An update that does not request any fields fails #174

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

Open
harendra-kumar opened this issue Mar 1, 2018 · 4 comments
Open

An update that does not request any fields fails #174

harendra-kumar opened this issue Mar 1, 2018 · 4 comments

Comments

@harendra-kumar
Copy link
Contributor

A pure update that does not request any fields in the results must be allowed. The following query fails to parse:

{SetResource(id:"1",resource:{resAge:20,resGender:"m"}){}}
@jml
Copy link
Collaborator

jml commented Mar 2, 2018 via email

@harendra-kumar
Copy link
Contributor Author

I did not look at the spec. I just thought it makes sense and assumed it. I will update if I happen to take a look at the spec.

@harendra-kumar
Copy link
Contributor Author

harendra-kumar commented Mar 2, 2018

yeah, I was confused whether to use {} or just omit it for an empty request, that must get clarified by the spec.

@jml
Copy link
Collaborator

jml commented May 25, 2018

AFAICT, the GraphQL spec does not prohibit empty selection sets, so this is a valid bug. However, it also does not say how to handle them, so fixing involves some decision making.

Things that you or someone else can do to help fix this bug:

  • review the spec to see if I've missed something
  • identify what other (esp. Facebook-authored) GraphQL servers do with this
    • include steps to reproduce, versions, etc.
  • write a test that would pass if this bug were fixed

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

No branches or pull requests

2 participants