absinthe_graphql_ws
absinthe_graphql_ws copied to clipboard
Add an ability to return payload on handle_init error
graphql-ws expects ErrorMessage on error, and Absinthe.GraphqlWS.Message.Error supports providing it, but Absinthe.GraphqlWS.Transport.handle_inbound uses handle_init callback return only as error id.
I think this library has two paths to resolve this:
- Add possibility to add payload provided by developer (expect
handle_initreturn something like{:error, {id, payload}, socket}) - Generate error inside this library
Stupid patch doesn't work