【发布时间】:2023-02-06 11:41:02
【问题描述】:
我在将 null 传递给 graphQL 过滤器变量时遇到问题
GGetPostsReq request = GGetPostsReq.fromJson({
"vars": {
"where": {
"deletedByProfileGuid": {
"eq": null
}
}
}
})!;
print(params.vars.toJson()); //{{where: {deletedByProfileGuid: {eq: }}}}
final client = initClient("http://localhost:5034/graphql/");
client.request(params).listen((response){
if(response.graphqlErrors != null){
print("error");
print(response.graphqlErrors);
}else{
print("data");
print(response.data?.toJson());
}
});
由于deletedByProfileGuid: {eq: } 无效
这会导致我的带有 Hotchocolate GraphQL 的 WebAPI 出现以下错误:
[GraphQLError(message: Unexpected Execution Error, ...
我知道这是我的 flutter-ferry 集成的错误,因为我已经在我的操场上成功运行了相同的查询。我已经在这上面花了 2 天时间,非常感谢任何指导。
【问题讨论】:
标签: flutter graphql build-runner ferry