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

Support $apply arguments #41

Open
kjellmorten opened this issue Feb 14, 2023 · 0 comments
Open

Support $apply arguments #41

kjellmorten opened this issue Feb 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kjellmorten
Copy link
Contributor

kjellmorten commented Feb 14, 2023

When you apply a mutation with the { $apply: '<mutationId>' } operator, there is a need to provide extra arguments that may be picked up in the mutation/pipeline.

The simplest would be to provide any extra props as variables on the action (see integreat-io/integreat#181). We might, however, need to run pipelines to get the value we pass on, so perhaps the props' values should be mutations themselves.

Example:

[
  'amount',
  {
    $apply: 'amount-as-currency-object',
    currency: '^.currencySymbol'
  }
]

Here, the currency prop is provided as a path, and the value from this path will be provided to the applied mutation.

@kjellmorten kjellmorten added the enhancement New feature or request label Feb 14, 2023
@kjellmorten kjellmorten transferred this issue from integreat-io/integreat Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant