-
We have a setup where we are proxying to another graphql server and we'll sometimes get back one or more errors along with partial data. After reading https://graphql-ruby.org/errors/execution_errors, it seems to me that you either have to do one or the other: Raise one error to populate the errors array or ignore the errors and return the partial data. Is there any way to be able to programmatically do both? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm not sure if this is available via the docs, but I found calling |
Beta Was this translation helpful? Give feedback.
I'm not sure if this is available via the docs, but I found calling
context.add_error
https://www.rubydoc.info/github/rmosolgo/graphql-ruby/GraphQL%2FQuery%2FContext%2FFieldResolutionContext:add_error does the trick