mirror of
https://github.com/atulmy/gql-query-builder.git
synced 2026-04-25 23:55:55 +03:00
[GH-ISSUE #23] handling undefined datatype #14
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#14
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 @derit on GitHub (Aug 23, 2019).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/23
when variable is undefined return a error
how to handling this error ?
@ARHariri commented on GitHub (Apr 1, 2020):
When you set a variable to an undefined like this
you get an error because the generator cannot infer the type of variable to set it. But when you assign your variable by an object value and set the
valueproperty to an undefined, like thisyou have not got an error whether you set
typeproperty or not (The defaulttypeisString)For now, you have to use the second format to set your variables (if some of the variables may be undefined). But I think the difference between these behaviors is incorrect and has to be fixed.