2

I'm coming to you because I've got a big problem.

I'm coding a live-forum with a graphql api. I use neo4j-driver, @neo4j/graphql and @neo4j/graphql-ogm in nodejs. As a real-time app, my project must use subscriptions to perform his prime function. In dev mode, I can use the graphql-subscriptions package, but for the production, I don't find anything for neo4j implementation. Is there an alternative ?

angrykoala
  • 3,774
  • 6
  • 30
  • 55
  • Currently, subscriptions are not supported by `@neo4j/graphql` (A beta support is under development for next release). You should be able to use subscriptions, as long as you manage them yourself, outside of Neo4j. What is the reason you can use them in dev mode but not in production? – angrykoala Mar 29 '22 at 09:27
  • The graphql-subscriptions package can manage only one server instance. This is no problem when developing in localhost. In production, it's a different story. – Nelson Delize Mar 29 '22 at 23:19
  • If you are building your own subscriptions, you need to use a production package implementing PubSub (check the list at https://www.npmjs.com/package/graphql-subscriptions), these packages would connect to a broker (like Redis or RabbitMQ) to handle multiple instances. This is independent of the database you may be using. Neo4j (and most databases) are not a suitable brokers for PubSub. – angrykoala Mar 30 '22 at 10:43

0 Answers0