You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is to deal with PATCH requests where the field missing represents something different than when the field is null.
I know this is probably counter to the ideal of arrow but figured I'd ask. Also would be interesting to hear how others may represent/handle this. Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm not sure this is actually possible so asking as a question here but given the following:
Is it possible to have
someNullableProperty
to only beNone
if the field is missing from the json butSome(null)
if the field is set tonull
? E.g.{ "required": 1 }
becomesPatchData(required: 1, someNullableProperty: None)
{ "required": 1, "someNullableProperty": null }
becomesPatchData(required: 1, someNullableProperty: Some(null))
This is to deal with PATCH requests where the field missing represents something different than when the field is null.
I know this is probably counter to the ideal of arrow but figured I'd ask. Also would be interesting to hear how others may represent/handle this. Thanks
Beta Was this translation helpful? Give feedback.
All reactions