Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update DateTime type with null #474

Open
bizk-sato opened this issue Jan 20, 2023 · 2 comments
Open

update DateTime type with null #474

bizk-sato opened this issue Jan 20, 2023 · 2 comments

Comments

@bizk-sato
Copy link

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.)
@knaeckeKami
Copy link
Collaborator

finished_at is a variable in your mutation, it's not defined in your schema. you need to check the type of your variable

@janweinkauff
Copy link

Is there a workaround to set a date to null until the PR is finished?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants