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

Cancel a subscription when the stream isn't listened to anymore... #133

Closed
yosef-abraham opened this issue Aug 22, 2020 · 3 comments
Closed

Comments

@yosef-abraham
Copy link
Contributor

Is there anyway to cancel a subscription?
I thought it might be a nice implementation to send the server a GQL_STOP payload when the stream is stopped being listened to.

What do you think?

@smkhalsa smkhalsa transferred this issue from gql-dart/ferry Aug 22, 2020
@smkhalsa
Copy link
Member

I'm moving this issue to the gql package as it relates to gql_link

@knaeckeKami
Copy link
Collaborator

I implemented this in my gql_phoenix_link package. It uses a slightly different protocol than apollo, but the concept is the same.
See https://github.com/knaeckeKami/gql_phoenix_link/blob/master/lib/src/phoenix_link.dart#L80

This works only on the master branch of ferry, as it depends on gql-dart/ferry#53

@agent3bood
Copy link
Collaborator

@klavs This can be closed.

@klavs klavs closed this as completed Oct 6, 2020
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

5 participants