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

Rename Relay.Mutation#getVariables? #711

Closed
clayallsopp opened this issue Dec 30, 2015 · 2 comments
Closed

Rename Relay.Mutation#getVariables? #711

clayallsopp opened this issue Dec 30, 2015 · 2 comments

Comments

@clayallsopp
Copy link

Should Relay.Mutation#getVariables be named something like getInput? Or something else that explicitly ties it to constructing the input argument?

My understanding and reading the docs suggests that the method is only ever used to in context with the input - in fact there's even a warning in the docs that tries to mitigate naming confusion.

@clayallsopp
Copy link
Author

getFatQuery might also be a candidate for renaming? i.e. getPayloadFragment / getPayloadQuery? (I believe it can only be a fragment on the payload type?)

@wincent
Copy link
Contributor

wincent commented Feb 8, 2016

Thanks for filing this issue @clayallsopp!

There is some reasoning behind this: mostly, consistency with the "variables" terminology used in the RelayDefaultNetworkLayer for other kinds of queries (and you can think of mutations are just special kinds of queries). Nevertheless, there is definitely scope for improving the names here.

This is important, so I'm going to fold it into #538, which is about overhauling the mutations API. (It will be easier to manage with the various interrelated mutations issues in a single place.) Lots of details in the API are expected to change, so that is probably the best place to consider this.

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

2 participants