mirror of
https://github.com/atulmy/gql-query-builder.git
synced 2026-04-25 23:55:55 +03:00
[GH-ISSUE #67] Fields data object #136
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gql-query-builder#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yashiroiori on GitHub (Mar 13, 2022).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/67
I try to send de query but send me an error
Query:
{
metrics {
id
name
paginatorInfo{
count
currentPage
firstItem
hasMorePages
lastItem
lastPage
perPage
total
}
}
}
Correct query:
{
metrics {
data {
id
name
}
paginatorInfo{
count
currentPage
firstItem
hasMorePages
lastItem
lastPage
perPage
total
}
}
}
Need put fields into object named "data {}", how can make if??
@yashiroiori commented on GitHub (Mar 13, 2022):
Solve using CustomQueryAdapter
Add data to put into object
private operationTemplate(variables: VariableOptions | undefined) {
return
${this.operation} { data ${variables ? Utils.queryDataNameAndArgumentMap(variables) : ""} ${this.fields && this.fields.length > 0 ? "{ " + Utils.queryFieldsMap(this.fields) + " }" : ""} };}