refine
refine copied to clipboard
[FEAT] Graphql - configurable mutation InputType
Is your feature request related to a problem? Please describe.
In create and update mutation queries, operation name can be configured via metadata. variable.input.type can't be configured as it's "hard coded".
There is case (or at list mine ;)), where InputType.type can't be the same as the "hardcoded by refine" ones.
Describe alternatives you've considered
No response
Additional context
No response
Describe the thing to improve
For example, in the dataProvider.create, and in the same spirit that allow to configure operation :
const operation = metaData?.operation ?? camelCreateName;
The variables.input.type should be something like:
const variableInputType = metaData?.variableInputType ?? `${camelCreateName}Input`
What do you think about that ? Is it doable ? Thanks for this great piece of lib !
Hey @florent-andre
GraphQL data provider needs various arrangements. This includes what you wrote. Can you create PR to support us? 🙏🏼
Yes, sure I can try (maybe this week or later on). Do you think metaData?.variableInputType is a good name ?
Regards
Yes, sure I can try (maybe this week or later on). Do you think
metaData?.variableInputTypeis a good name ? Regards
I think metaData?.variableInputType can be found better, we are open to suggestions. We look forward to PR 🎉
Hello! I'll open a PR for this one!