Back to Graphql Ruby

Action Cable Implementation

guides/subscriptions/action_cable_implementation.md

2.6.1741 B
Original Source

ActionCable is a great platform for delivering GraphQL subscriptions on Rails 5+. It handles message passing (via broadcast) and transport (via transmit over a websocket).

To get started, see examples in the API docs: {{ "GraphQL::Subscriptions::ActionCableSubscriptions" | api_doc }}. GraphQL-Ruby also includes a mock ActionCable implementation for testing: {{ "GraphQL::Testing::MockActionCable" | api_doc }}.

See client usage for:

  • {% internal_link "Apollo Client", "/javascript_client/apollo_subscriptions" %}
  • {% internal_link "Relay Modern", "/javascript_client/relay_subscriptions" %}.
  • {% internal_link "GraphiQL", "/javascript_client/graphiql_subscriptions" %}