lvarayut / relay-fullstack

:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
https://lvarayut.github.io/relay-fullstack/
MIT License
985 stars 126 forks source link

How to use subscription #102

Closed neosarchizo closed 7 years ago

neosarchizo commented 7 years ago

I also asked thie question in stackoverflow. But anyone doesn't answer the question.

I saw the post about subscription of GraphQL. I want to use subscription of GraphQL in relay-fullstack.

How can I use subscription of GraphQL in relay-fullstack?

Neitsch commented 7 years ago

The issue of subscriptions is nothing specific to this project. You might want to create an issue in graphql, that it is lacking documentation. The code to support it is here: https://github.com/graphql/graphql-js/tree/master/src/subscription I think this tutorial will be helpful https://medium.com/react-native-training/building-chatty-part-6-graphql-subscriptions-b54df7d63e27 Once you have set up the server side you will also have to implement Relay subscriptions on the client side.

I'd be happy to review a PR when you have figured out how to do it.

neosarchizo commented 7 years ago

@Neitsch Thanks!! It was a lot of help! If I figure out, I'll share how to do it!