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

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Jul 29, 2020

GraphQL supports supplying multiple queries in the query parameter,
but an additional operationName parameter is then required to select
the query to execute.

Previously, it was impossible to pass operationName since it would get
serialized under variables, but it needs to be a top-level parameter.
With this change, operationName is a special GraphQL parameter name
just like query already is.

$ cat queries.graphql
query Q1 { ... }
query Q2 { ... }

$ gh api graphql -f operationName=Q1 -F [email protected]

GraphQL supports supplying multiple queries in the `query` parameter,
but an additional `operationName` parameter is then required to select
the query to execute.

Previously, it was impossible to pass `operationName` since it would get
serialized under `variables`, but it needs to be a top-level parameter.
With this change, `operationName` is a special GraphQL parameter name
just like `query` already is.
@mislav mislav merged commit 88eaa28 into trunk Jul 29, 2020
@mislav mislav deleted the api-graphql-operationName branch July 29, 2020 19:09
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

Successfully merging this pull request may close these issues.

2 participants