Bonfire.API.GraphQL.GraphqlWSSocket (Bonfire v1.0.5-social-rc.8)

Copy Markdown View Source

graphql-transport-ws websocket transport for GraphQL subscriptions (the protocol Ferry / graphql-ws clients speak), separate from the Phoenix-channels Absinthe.Phoenix.Socket at /api/socket.

Auth: the client sends its bearer token in the connection_init payload (graphql-ws connectionParams); we verify it and put current_user into the Absinthe context so subscriptions can scope to the viewer.