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

clientMutationId -> clientSubscriptionId? #6

Closed
taion opened this issue Aug 19, 2016 · 3 comments
Closed

clientMutationId -> clientSubscriptionId? #6

taion opened this issue Aug 19, 2016 · 3 comments

Comments

@taion
Copy link
Member

taion commented Aug 19, 2016

I'm curious why this library uses clientMutationId to identify subscriptions. Looking at facebook/relay#541, it seems like the original sketch called the field clientSubscriptionId. I think the latter would make more sense.

@taion
Copy link
Member Author

taion commented Aug 20, 2016

@edvinerikson
Copy link
Member

So the reason for having clientMutationId was because in earlier versions of Relay, the mutation API didn't check if this field was present or not is just assumed it was therefor it would throw an error.

I think that we can remove it or rename it to clientSubscriptionId. I am not sure it will provide any value for us anyway since clientMutationId is only used for applying optimistic updates which subscriptions doesn't have.

But... to be more extensible I think we should always pass it as a input argument so that users can query it if they want.

@taion
Copy link
Member Author

taion commented Aug 21, 2016

Well, the GraphQL server will complain if it gets an unsupported input field.

I want to figure out how much of the subscription map management can reasonably be done at the library level (i.e. here) v. at the network layer level.

It's possible that this field is just entirely useless and should go away completely. My first cut implementation is making no use of it.

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

2 participants