The Wayback Machine - http://web.archive.org/web/20201025184939/https://github.com/f/graphql.js/issues/6
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

Better Subscription #6

Open
f opened this issue Feb 19, 2017 · 5 comments
Open

Better Subscription #6

f opened this issue Feb 19, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@f
Copy link
Owner

@f f commented Feb 19, 2017

Subscriptions need to be implemented.

They can be that easy:

var onCommentsAdded = graph.subscribe`{ commendAdded { user {name}, text } }`

onCommentsAdded(function (data) {
  console.log(data.user.name)
})

And can be unsubscribed.

var onCommentsAdded = graph.subscribe`{ commendAdded { user {name}, text } }`

onCommentsAdded.unsubscribe()
@f f self-assigned this Feb 19, 2017
@f f added the enhancement label Feb 19, 2017
@f f added this to the v1.0.0 milestone Feb 19, 2017
@f
Copy link
Owner Author

@f f commented Feb 20, 2017

EventSource is the best model to be updated by subscriptions.

@emahuni
Copy link

@emahuni emahuni commented Aug 1, 2019

do subscriptions work without sockets? never saw anything about web socket connections. are subscriptions working now?

@corstian
Copy link

@corstian corstian commented Sep 9, 2019

Are subscriptions implemented at all? Though I see some helper methods in the documentation and source code I can't seem to get them to work...

@hedevelop
Copy link

@hedevelop hedevelop commented Nov 3, 2019

Cant find how subscriptions can work ..... someone has a sample ?

@corstian
Copy link

@corstian corstian commented Nov 4, 2019

@hedevelop Subscriptions are not implemented. Personally I switched to the Apollo stack in order to be able to consume subscriptions.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.