Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions example #45

Closed
giacomorebonato opened this issue May 11, 2016 · 3 comments
Closed

Subscriptions example #45

giacomorebonato opened this issue May 11, 2016 · 3 comments

Comments

@giacomorebonato
Copy link

Where can I find a sample implementation of subscriptions?
In the GraphQL blog it is too much theoretical... at least for my preparation.

Cheers.

@hardchor
Copy link

Hey @giacomorebonato

Subscriptions are still in the very early stages, and you're right - there isn't a lot of documentation around them.

I suppose you'd like to use them as a real-time API? There's a few steps necessary to achieve that:

  • trigger a NOTIFY command in postgres on INSERT/UPDATE/DELETE
  • attach some kind of listener (e.g. pg-pubsub or pgsql-listen-exchange (via RabbitMQ))
  • create a Websocket server that handles subscriptions and updates

As you can see, that goes over and above the scope of this project. If you decide to go down that route, I'd be curious as to what your experiences are.

@calebmer
Copy link
Collaborator

You can also follow graphql/graphql-spec#109 which is the unmerged spec to the GraphQL language supporting subscriptions 😊

@babakness
Copy link

Subscriptions have merged graphql/graphql-spec#267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants