Absinthe.GraphqlWS.Transport.handle_info
handle_info
, go back to Absinthe.GraphqlWS.Transport module for more information.
Specs
handle_info(term(), socket()) :: reply_message()
Receive messages from inside the house.
:keepalive
- Regularly send messages with opcode of0x09
, ie:ping
. Thegraphql-ws
library has a strong opinion that it does not want to implement client-side keepalive, so in order to keep the websocket from closing we need to send it messages.subscription:data
- After we subscribe to an Absinthe subscription, we may receive messages for the relevant subscription. Thegraphql-ws
will have sent us anid
along with the subscription query, so we need to map our internal topic back to thatid
in order for the client to figure out what to do with our message.:complete
- If we get aquery
or amutation
on the websocket, we're supposed to reply with aNext
message followed by aComplete
message. We follow through on the latter by putting a message on our process queue.fallthrough - If
c:Absinthe.GraphqlWs.Socket.handle_message/2
is defined on the socket, then uncaught messages will be sent there.