You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few potential problems I'm aware of in this example:
CreateFoo now has its own default value for arg1. There is no way (that I'm aware of) to define this operation where the default from arg1 will be automatically carried to $arg1. @sirugh hit this issue in pwa-studio recently (they just wanted to use whatever default the server used)
If an optional arg is added to Mutation.createFoo, and a user of pwa-studio wants to use it, they have to change both UI Components and the query itself (rather than just the UI component).
We currently have the following guidance documented for new handling of input data to an operation:
https://github.com/magento/architecture/blob/master/design-documents/graph-ql/extensibility.md
It states that the solution for extensibility is:
There's a problem with argument lists worth considering.
Example
Imagine this is a mutation in our schema:
To use this,
pwa-studio
will likely parameterize it:There are a few potential problems I'm aware of in this example:
CreateFoo
now has its own default value forarg1
. There is no way (that I'm aware of) to define this operation where the default fromarg1
will be automatically carried to$arg1
. @sirugh hit this issue inpwa-studio
recently (they just wanted to use whatever default the server used)Mutation.createFoo
, and a user ofpwa-studio
wants to use it, they have to change both UI Components and the query itself (rather than just the UI component).What is the alternative
The alternative is leaning on Input Object types to act as a bag of named arguments.
Re-Written Example
The text was updated successfully, but these errors were encountered: