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

Notification/subscription support #207

Closed
iketheadore opened this issue Jun 4, 2017 · 6 comments
Closed

Notification/subscription support #207

iketheadore opened this issue Jun 4, 2017 · 6 comments
Labels

Comments

@iketheadore
Copy link

Hey guys:

Thanks for all your awesome works, and do we have notification/subscription supported now?

@trevex
Copy link

trevex commented Jul 28, 2017

There was a previous discussion here: #49

I am currently making myself familiar with this topic as well and from what I can see the building
blocks are all in place, but currently you have to go the extra mile yourself.

As far as I can see you have to do basically the following:

  • parse your query to get the AST
  • validate it with your schema and potentially other rule functions
  • setup your pubsub system (possibly using the arguments/variables)
  • for every message received by the pubsub system execute your query and and inject the received message as RootObject and send the result to the client

@trevex
Copy link

trevex commented Jul 31, 2017

Similar to the extension library for the JS graphql library:
https://dev-blog.apollodata.com/a-proposal-for-graphql-subscriptions-1d89b1934c18

I implemented the same pattern for graphql-go:
https://github.com/trevex/graphql-go-subscription/blob/master/examples/simple.go

It still fairly untested and immature (completely misses the transport stuff), but let me know what you think. Feel free to report bugs or submit PRs (although I am on holiday soonish).

@gabrielruiu
Copy link

Any updates for this issue?

@maurodelazeri
Copy link

Also interested

@ulm0
Copy link

ulm0 commented Jan 8, 2018

Looking forward into this as well.

@chris-ramon
Copy link
Member

Hi guys, thanks a lot for your awesome feedback! 👍 — really appreciate it, subscriptions is being supported in the lib for a while now, closing this one, you might want to take a look to the example shown in a related GitHub comment: #49 (comment)

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

No branches or pull requests

6 participants