ferry
ferry copied to clipboard
update DateTime type with null
I want to update DateTime(GDateTime) value with null. So I did something like below.
final req = GUpsertModelReq((b) {
b.vars.input.finished_at.value = null;
return b;
}
await client.request(req)
finished_at in graphql schema is nullable field.
And then I got the error message below.
I want to know where to put @nullable?
BuiltValueNestedFieldError (Tried to build class "GupsertModelReq" but nested builder for field "vars" threw: Tried to build class "GupsertModelVars" but nested builder for field "input" threw: Tried to build class "GUpsertModelMutationInput" but nested builder for field "finishedAt" threw: Tried to construct class "GDateTime" with null field "value". This is forbidden; to allow it, mark "value" with @nullable.)
finished_at is a variable in your mutation, it's not defined in your schema. you need to check the type of your variable
Is there a workaround to set a date to null until the PR is finished?