You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume I could just attach the strongly typed error to context.Result, but I'm curious how to update Hot Chocolate's interpretation of the method return type so that it's refactored as a union of T | ValidationErrors rather than just T. Do you know if there any good way to do that I'm overlooking?
Thanks in advance for any pointers. I think a helper there would make a good addition to the library.
The text was updated successfully, but these errors were encountered:
Thanks for the kind words @leebenson . Sorry I haven't got back to you.
I'm going to close this in favour of #77 which I hope will solve this. Essentially we'll support a ValidationError out of the 6a error convention union. I'll start up the discussion over there shortly and we can all review.
Thanks for a great helper lib!
I'd like to build an error handler that returns strongly typed errors rather than the free-for-all that is a top-level
errors
field.Generally, if I was doing this manually, it'd look something like:
I assume I could just attach the strongly typed error to
context.Result
, but I'm curious how to update Hot Chocolate's interpretation of the method return type so that it's refactored as a union ofT | ValidationErrors
rather than justT
. Do you know if there any good way to do that I'm overlooking?Thanks in advance for any pointers. I think a helper there would make a good addition to the library.
The text was updated successfully, but these errors were encountered: