mirror of
https://github.com/atulmy/gql-query-builder.git
synced 2026-04-25 23:55:55 +03:00
[GH-ISSUE #28] Support array variables #114
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#114
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 @ARHariri on GitHub (Mar 31, 2020).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/28
I want to pass an array of strings as a variable to a query (e.g. a list of tags that should be searched), I have no choice except change my type from
Stringto[String]. Also, if none of the array items can be null or undefined, I should change this to[String!].It doesn't seem good practice, so I suggest using something like Nexus
listto specify both array and nullability of array items.For example a variable input like this:
should be generated as:
$tags: [String!]!So the type of Variable should be:
list: truemeans the variable should be in array format but its items are nullable (that equals tolist: [false]list: [true]means the variable should be in array format and its items are not nullableand
list: undefinedmeans the variable is not in array format