Skip to content

"operationName" should not be part of "variables" #81

@FabioGimmillaro

Description

@FabioGimmillaro

Hi guys,

I just tried to test my graphQL-API with GraphiQL and everything worked fine.

But when I tried to define multiple queries/mutation in one body I got a GraphQLError "Must provide an operation name from: [op1, op2]"

I soon realized that you actually read the operationName out of the variables string I provide for the schema execution.
Wouldn't it be better to add a new argument "operationName" to the execute-function of the schema?

Otherwise I have to inject the operationName into the variables before calling the function.

Greetings,
Fabio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions