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

print mutation variables besides $input #344

Closed

Conversation

josephsavona
Copy link
Contributor

Addresses #307 - We currently assume that mutations have exactly one variable $input - however, tracked queries may contain fields with calls that have Enum/InputObject types. These call values must also be printed as variables.

Changes:

  • add a preset argument to profilePicture that accepts an Enum value, as a way of testing call variables in tracked queries
  • change RelayMutationQuery to accept the value of $input as a param and pass it through to RelayQuery.Node.buildMutation
  • Change the printer to handle variables in mutations the same as they are handled in queries.
  • Change RelayMutationRequest to return the variables from the printer instead of hard-coding to $input

@josephsavona
Copy link
Contributor Author

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/411063092423283/int_phab to review.

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

Successfully merging this pull request may close these issues.

None yet

2 participants