[GH-ISSUE #19] Operation name #12

Closed
opened 2026-03-03 00:02:43 +03:00 by kerem · 1 comment
Owner

Originally created by @atulmy on GitHub (Aug 6, 2019).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/19

Reference: https://graphql.org/learn/queries/#operation-name

Current:

query {
  thoughts {
    id,
    name,
    thought
  }
}

Option to pass query name ThoughtList

query ThoughtList {
  thoughts {
    id,
    name,
    thought
  }
}
Originally created by @atulmy on GitHub (Aug 6, 2019). Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/19 Reference: https://graphql.org/learn/queries/#operation-name Current: ``` query { thoughts { id, name, thought } } ``` Option to pass query name `ThoughtList` ``` query ThoughtList { thoughts { id, name, thought } } ```
kerem 2026-03-03 00:02:43 +03:00
Author
Owner

@Devorein commented on GitHub (Jun 29, 2020):

That could be solved by replacing the resultant query via generated.query = generated.query.replace('query',"query "+opName);

But I assume that it could be added to the api itself as part of an argument to the query, mutation and subscription functions.

<!-- gh-comment-id:650976074 --> @Devorein commented on GitHub (Jun 29, 2020): That could be solved by replacing the resultant query via `generated.query = generated.query.replace('query',"query "+opName);` But I assume that it could be added to the api itself as part of an argument to the query, mutation and subscription functions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#12
No description provided.