Search code examples
reactjsgraphqlrelayjs

How to use GraphQL supbscription with react-relay?


How can I use the GraphQL subscriptions with React-Relay ?
I found a solution using relay-subscriptions package, but I'm still looking for a solution provided by Relay only without any extra packages.
PS: I'm using a graphql hosted plateform provided by Scaphoold.io


Solution

  • Here is a new tutorial on how you can setup GraphQL Subscriptions with react.

    https://scaphold.io/blog/2016/11/09/build-realtime-apps-with-subs.html

    I haven't spent enough time with subscriptions in relay yet but they are super easy to setup with Apollo Client, can run alongside relay, and will work with Scaphold immediately! I hope this helps!