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.
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:
Here, the
currencyprop is provided as a path, and the value from this path will be provided to the applied mutation.