Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is operationName used for? #7

Closed
teckays opened this issue Feb 13, 2018 · 2 comments
Closed

What is operationName used for? #7

teckays opened this issue Feb 13, 2018 · 2 comments

Comments

@teckays
Copy link

teckays commented Feb 13, 2018

I am getting an error like GraphQLError: Unknown operation named "..."

I've noticed the object passed to the GraphQL server consists of:

{
    operationName: "...",
    query: "...",
    variables: { ... }
}

why operationName is passed when it should only send query and variables?

@gucheen
Copy link
Owner

gucheen commented Feb 16, 2018

@teckays You can refer to GraphQL Docs http://graphql.org/learn/queries/#operation-name

The operation name is a meaningful and explicit name for your operation.

@teckays
Copy link
Author

teckays commented Feb 21, 2018

Git it! Thank you

@teckays teckays closed this as completed Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants