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

Querying a field/argument which doesn't exist fails the whole query rather than just that branch #329

Open
dantb opened this issue Jan 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dantb
Copy link
Contributor

dantb commented Jan 6, 2023

For example misspelling one of the top-level fields produces something like below, without any data, despite other fields being requested independently.

{
  "errors": [
    {
      "message": "Unknown field 'myFieldd' in select"
    }
  ]
}

Unsure whether this is expected GraphQL behaviour or we should be more permissive. Perhaps it could be configurable? If it is possible I'm happy to be pointed to the relevant part of the code to give it a go 😄

@milessabin milessabin added the bug Something isn't working label May 31, 2023
@milessabin
Copy link
Member

Sorry, I completely missed this. Yes, the spec allows a partial result in this case. I suspect that this is a special case due to the misspelling being in a top level field ... I'm fairly sure that a similar error in a subobject field would be handled the way you're expecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants