Closed varstos closed 3 years ago
Yes, this is possible using mapJsVariables
here you have a function that can manipulate the Raw.t_variables
which includes Js.Nullable.t
's.
Yes, this is possible using
mapJsVariables
here you have a function that can manipulate theRaw.t_variables
which includesJs.Nullable.t
's.
Exactly what I needed I am closing this as this is resolved, thank you!
I have a mutation that updates an entity. When passing input parameters I want one of the fields to be sent as Null. However, when I try to running something like this:
This is the variable object I find in the network request
While I wanted to send something along these lines
I found a workaround for this which passes
Js.Nullable.null->Obj.magic
instead ofNone
. I know this violent usage ofJs.Nullable.null
is not the nicest way to handle this issue, but as we are passing this straight to the Javascript world I don't think this can cause any issues down the line. I think it would be better if we could introduce a better way to handle something like this and make it type-safe.