Skip to content

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

@MurzNN

Description

@MurzNN

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions