ash-project / ash_graphql

The extension for building GraphQL APIs with Ash

Home Page:https://hexdocs.pm/ash_graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow customization of key `result(s)` with mutations

sezaru opened this issue · comments

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 to have the resource name there instead of a generic one.

For example, if the resource being returned is Offer, then the key would be offer or offers.

Describe the solution you'd like
I would like to have some options that I add to the mutation to customize that key name.

Describe alternatives you've considered
I can achieve that if I create the whole mutation manually, but that kinda defeats the purpose of using Ash