graphql
graphql copied to clipboard
How to set the custom query name for a GraphQL query?
I see that the library automatically generates the name of the query in some cases. For example, here:
$variable = new GraphQL\Entities\Variable('name', 'String');
$hero = new \GraphQL\Actions\Query('hero', ['name' => $variable]);
echo $hero->use('name')->query();
it generates the name getHero.
But how can we manually set the custom name of the query, eg getMyHeroName? Can't find any API for this.