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 · 7 comments
Open

Better Subscription #6

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

Comments

@f
Copy link
Owner

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 commented Feb 20, 2017

EventSource is the best model to be updated by subscriptions.

@emahuni
Copy link

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 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

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

@corstian
Copy link

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.

@frink
Copy link

frink commented Feb 9, 2021

Is this thing abandoned?

I like the library but the lack of subscriptions is a problem. Hasura uses websockets which seem pretty easy to implement. The lib is simple enough that I could probably hack a solution together if anyone is still interested.

Do I need to hard fork the thing?

@f
Copy link
Owner Author

f commented Feb 9, 2021

@frink I do not really know how subscriptions work but if you're interested in improving it I really want to see your PR and want to add you as a contributor! Can you simply implement?

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

No branches or pull requests

5 participants