Skip to content
New issue

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

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

Already on GitHub? # to your account

Subscriptions RFC: Where to store subscription state? #279

Closed
robzhu opened this issue Mar 6, 2017 · 3 comments
Closed

Subscriptions RFC: Where to store subscription state? #279

robzhu opened this issue Mar 6, 2017 · 3 comments

Comments

@robzhu
Copy link
Contributor

robzhu commented Mar 6, 2017

Where should subscription state be stored? (inside GraphQL-js or as a separate component?)
@theorygeek @taion @stubailo @rmosolgo @jamesgorman2

Continuing the conversation from: #267 (comment)

@taion
Copy link

taion commented Mar 6, 2017

I don't think this matters for the spec. Implementation-wise I think it'd be neater to have the state live outside GraphQL.js though.

@rmosolgo
Copy link

rmosolgo commented Mar 6, 2017

👍 Agreed that it should be basically excluded from the spec.

In the same way that storage and transport are "application-specific", subscription management should also be application-specific.

For example, one application may push updates over a websocket connection and consider a client unsubscribed when the connection is closed, while another application may respond to subscriptions by creating webhooks and push updates by hitting a client-supplied URL. Ideally, the spec would be flexible enough to accommodate either case without prescribing one or the other.

(Personally, if I set up GraphQL subscriptions, it would probably be based on Pusher, which is neither here nor there!)

@robzhu
Copy link
Contributor Author

robzhu commented Mar 28, 2017

@leebyron this is relevant to the discussion we had about subscription state.

@taion, @rmosolgo Looks like we have consensus to leave this out of the spec. I'll submit a PR to clarify the message in the RFC.

EDIT: Upon re-reading the RFC, there's are no implied constraints or recommendations for packaging/module breakdown, so I won't submit a PR after all. Closing this issue.

@robzhu robzhu closed this as completed Mar 28, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants