Here is the query
query UpcomingPendingEvents($attendantId: ID, $eventDateTimeGt: DateTime) {
attendances(attendant_Id: $attendantId, attending: "0",
event_Datetime_Gt: $eventDateTimeGt, first: 10,) {
# some fields here
}
}
I get the error A value of type 'DateTime' can't be assigned to a variable of type 'GDateTimeBuilder?'
when I use the following query
gqlClient.request(GUpcomingPendingEventsReq(
(b) => b
..vars.attendantId = attendantId
..vars.eventDateTimeGt = DateTime.parse('2021-12-15T17:00:00'),
));
And when I try to use it like that.
gqlClient.request(GUpcomingPendingEventsReq(
(b) => b
..vars.attendantId = attendantId
..vars.eventDateTimeGt = DateTime.parse('2021-12-15T17:00:00') as GDateTimeBuilder?,
));
I get runtime error
type 'DateTime' is not a subtype of type 'GDateTimeBuilder?' in type cast
.
I think you need to assign it to the
value
on theGDateTimeBuilder
.