这是查询
query UpcomingPendingEvents($attendantId: ID, $eventDateTimeGt: DateTime) {
attendances(attendant_Id: $attendantId, attending: "0",
event_Datetime_Gt: $eventDateTimeGt, first: 10,) {
# some fields here
}
}
A value of type 'DateTime' can't be assigned to a variable of type 'GDateTimeBuilder?'
使用以下查询时出现错误
gqlClient.request(GUpcomingPendingEventsReq(
(b) => b
..vars.attendantId = attendantId
..vars.eventDateTimeGt = DateTime.parse('2021-12-15T17:00:00'),
));
当我尝试这样使用它时。
gqlClient.request(GUpcomingPendingEventsReq(
(b) => b
..vars.attendantId = attendantId
..vars.eventDateTimeGt = DateTime.parse('2021-12-15T17:00:00') as GDateTimeBuilder?,
));
我得到运行时错误
type 'DateTime' is not a subtype of type 'GDateTimeBuilder?' in type cast
。