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

Add ability to set operation names on Query/Mutate. #8

Open
wants to merge 1 commit into
base: master
from

Conversation

2 participants
@seanpile

seanpile commented Dec 28, 2017

AFAIK, there is currently no way to add an Operation Name to queries.

Added two api methods: client.QueryByName and client.MutateByName
which take an operationName argument that gets passed onto the created
query string.

This is a backward compatible change, although you could argue that operation name should be a first class citizen on the Query/Mutate methods, but that would break existing clients.

Fixes #12.

Add ability to set operation names on Query/Mutate.
Added two api methods: `client.QueryByName` and `client.MutateByName`
which take an `operationName` argument that gets passed onto the created
query string.
@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Dec 30, 2017

Member

Thanks for the PR.

Can you please explain why it might be useful to have the ability to set the operation name in the context of graphql?

Member

dmitshur commented Dec 30, 2017

Thanks for the PR.

Can you please explain why it might be useful to have the ability to set the operation name in the context of graphql?

@seanpile

This comment has been minimized.

Show comment
Hide comment
@seanpile

seanpile Jan 1, 2018

seanpile commented Jan 1, 2018

@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Jan 4, 2018

Member

Thanks, that's helpful. I'll need some more time to think about how to best integrate a solution to this.

Member

dmitshur commented Jan 4, 2018

Thanks, that's helpful. I'll need some more time to think about how to best integrate a solution to this.

@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Feb 20, 2018

Member

I've reviewed this but come up with a question about which API to go with. See #12. We need to come to a decision there in order to proceed with merging this.

Member

dmitshur commented Feb 20, 2018

I've reviewed this but come up with a question about which API to go with. See #12. We need to come to a decision there in order to proceed with merging this.

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