Rename the `result(s)` field if a GraphQL mutation output

Right now, if I create a mutation with Ash, the output data will be inside the result or results field (see image). Is there some way to me to customize that name without having to create the whole mutation by hand? For example, in the case of the image, I would like that instead of result the key would be offer
No description
5 Replies
ZachDaniel
ZachDaniel3y ago
There is not a way currently, but we could support that feature pretty easily 🙂 We just hardcode the “result” key but could make it configurable.
Blibs
BlibsOP3y ago
That would be super, it would stop my frontend devs from complaining about things that don't matter 😅
ZachDaniel
ZachDaniel3y ago
Can you make an issue in ash_graphql? I could also guide you to what would need to change and you could make the PR?
Blibs
BlibsOP3y ago
Ofc, I will do it ASAP
Blibs
BlibsOP3y ago
GitHub
Allow customization of key result(s) with mutations · Issue #57 ·...
Is your feature request related to a problem? Please describe. Right now when you create a mutation with AshGraphQL, the output data will be inside the result or results field. Some people prefer t...

Did you find this page helpful?