Implementation

The GraphQL::Subscriptions plugin is a base class for implementing subscriptions.

Each method corresponds to a step in the subscription lifecycle. See the API docs for method-by-method documentation: GraphQL::Subscriptions.

Also, see the Pusher implementation guide, the Ably implementation guide, the ActionCable implementation guide or GraphQL::Subscriptions::ActionCableSubscriptions docs for an example implementation.

Considerations

Every Ruby application is different, so consider these points when implementing subscriptions:

Broadcasts

Broadcasting updates to multiple subscribers is supported by GraphQL-Ruby, but requires implementation-specific work, see more in the Broadcast guide.