getting the same behavior of null
and undefined
as in the query builder for generated queries
#618
Unanswered
halindraprakoso
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've been attempting to create a reusable update statement that utilizes optional parameters via edgeql codegen. Essentially, I'm aiming to replicate the behavior of the query builder; when I pass
null
, it sets a property to empty, whileundefined
leaves the property unchanged to prevent unwarranted mutation. However, I'm couldn't make it work since passing eithernull
orundefined
results in an empty set.the following statement helps the latter but it's difficult to set the value to empty set
unless if it's a
str
, I could still have a verbose workaround like this:any ideas?
Beta Was this translation helpful? Give feedback.
All reactions