Apollo graphql rail subscription + actioncable + redis pubsub

I am trying to archive a graphql subscription using apollo + Rails actioncable (redis pubsub backend).

Problem

I am currently using graphql-ruby and it does queryand mutationis fine, but the gem does not support subscription.

thoughts

I have only a little knowledge about graphql and redis, and therefore it may seem silly, but I think that if I set up a dedicated graphql server (only for subscription) that is connected to the same redis database that the rails use, the translation from Should the rails actioncable in redis be raised by the graphql server?

enter image description here

rails

sends hash data through broadcast, as usual, no changes.

ActionCable.server.broadcast(...)

graphql

graphql, GraphQL Redis Pub Sub, redis.

- ?

graphql ?

+4

Source: https://habr.com/ru/post/1669003/


All Articles