arkgil
GraphQL subscriptions, Absinthe and Phoenix channels
Does anyone know of any resources on how GraphQL subscriptions are implemented in Absinthe? Specifically, I’m wondering how the GraphQL subscription protocol looks like and how it makes use of Phoenix channels.
GraphiQL is able to set up a subscription to Absinthe/Phoenix socket, and I’m not sure how it works without knowledge of the channels protocol 
Marked As Solved
benwilson512
Hey @arkgil! Great questions. https://github.com/absinthe-graphql/absinthe-socket provides various integrations with Apollo, Relay, or plain JS that ultimately wrap Phoenix.js. The various GraphiQL UIs generally provide the ability to swap out how network calls are made, so we just swap in the relevant absinthe-socket implementation, and it calls Phoenix.js functions.
Also Liked
easco
easco
Apollo has clients for Android and iOS.
But Apollo uses a different Web Socket protocol than AbsinthePhoenix to handle communication.
I started an adapter to integrate the Apollo protocol with Absinthe that you can find here:
But at this point it is out-of-date with phoenix and it never was driven to completion. Caveat Emptor but it’s there if you care to look at it.








