Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"An operation name is required if the query contains multiple operations" #406

@Nasr-Ladib

Description

@Nasr-Ladib

Hi. I am trying to put many queries and fragments inside one request.
My POST request's body:

query login {
  createSession(email:"[email protected]", password: "foobar"){
    session
  }
}

query me {
  deserializeUser{
    id,
    email,
    name
  }
}

I found that I can add ./src/graphql.ts:11

const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]

add a non-variable option operationName

const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType","operationName"]

Please give me some clues. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: SupportAny questions, information, or general needs around the SDK or GitHub APIsreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions