vic / apollo-phoenix-websocket

An Apollo networkInterface for executing GraphQL queries via Phoenix Channels
Apache License 2.0
91 stars 9 forks source link

Question: How to initiate a subscription from the client #24

Closed adam-jr closed 7 years ago

adam-jr commented 7 years ago

One thing that's a bit unclear from the docs is how do I initiate a subscription from the client?

I see that client.networkInterface has a subscribe() function on it. Do I use that? If so, what are its arguments?

Is it possible to wrap a component in the graphql HOC like how one does with queries and mutations?

adam-jr commented 7 years ago

Found my answer, closing this issue.

For any who have a similar question, you're looking for data.subscribeToMore: http://dev.apollodata.com/react/subscriptions.html#subscribe-to-more