gqlgen icon indicating copy to clipboard operation
gqlgen copied to clipboard

UUID scalar in input returns `path`

Open voslartomas opened this issue 11 months ago • 0 comments

What happened?

Hello, we are using gqlgen for our subgraphs services along with Apollo router as gateway. Now we started to use new UUID scalar from gqlgen and whenever invalid values is being sent in input, it will return error (which is correct I guess), but it will return error with path field, which is not correct according to Apollo engineers as if there is no response for request router will just remove all the errors which are not following response path. It seems lile from GraphQL specs path should follow only response data, not input.

Reference to spec https://spec.graphql.org/October2021/#sec-Errors.Error-result-format

And section which seems to be related

If an error can be associated to a particular field in the GraphQL result, it must contain an entry with the key path that details the path of the response field which experienced the error. This allows clients to identify whether a null result is intentional or caused by a runtime error.

What did you expect?

I am not sure what to expect to be honest, maybe if there is just a way how to omit path from errors for inputs?

Minimal graphql.schema and models to reproduce

versions

  • go run github.com/99designs/gqlgen version? latest
  • go version? latest

voslartomas avatar Sep 18 '23 10:09 voslartomas