Absinthe Socket Transport — Absinthe via Channels with Apollo in Swift

This project is for the small group of people who find themselves in the middle of this venn diagram:

  • You use Absinthe on top of Phoenix Channels to provide a websocket-based GraphQL server
  • You use Apollo’s Swift client library to provide a GraphQL client for your Swift project

To make the two ends of that tunnel work together, you can either modify the server or, now, modify the client.

This project provides a NetworkTransport implementation for the Apollo iOS client that works with Absinthe over Phoenix Channels. This enables subscriptions as well as queries and mutations.

As someone decidedly not an expert in Swift, I disclaim that you should be careful using this package. However, if you’re looking for a minimal way to get your Swift-based app off the ground and communicating with your Absinthe server, it’ll do.

4 Likes