Replies: 1 comment
-
Lighthouse uses a singleton to collect the errors (https://github.com/nuwave/lighthouse/blob/e655b97782c64fea9a034ba3c99d47b20110f4ec/src/Execution/ErrorPool.php) and then adds them to the final result (https://github.com/nuwave/lighthouse/blob/e655b97782c64fea9a034ba3c99d47b20110f4ec/src/GraphQL.php#L282-L284). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a CRM-application with complicated roles system for users. In application business logic i should restrict using some input args in mutations. In this case i want execute mutation, but just ignore some passing arguments values and return mutation result with one or few errors in response.
As i can see, this behavior should not violate graphql spec response errors, but i cant find right way to do it. If i will throw exception in mutation, the result will be contain errors with empty data, but i want have errors and data together in mutation result
I found, that this behavior can be achived by extending and replacing ReferenceExecutor, but i think, that its wron way, or not?
Beta Was this translation helpful? Give feedback.
All reactions