graphql icon indicating copy to clipboard operation
graphql copied to clipboard

How to set the custom query name for a GraphQL query?

Open MurzNN opened this issue 1 year ago • 0 comments

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.

MurzNN avatar Aug 08 '24 06:08 MurzNN