-
0 votesanswersviews
GraphQL:返回一个带有非可空id字段的类型作为查询结果
我有这种类型: type Profile { id: ID! @isUnique email: String! @isUnique ... } 一个查询: profile(email: String!):Profile 当我用不存在的用户运行查询时,我的底层解析器返回null,我期待GraphQL这样 . 但是,我收到此错误: Cannot return null ... -
2 votesanswersviews
在react-apollo中命名你的graphql突变
考虑以下 const createBob1 = gql` mutation createBob2($var: data) { createBob3(var: $var) { id } } ` 在三个层面,我们命名突变: createBob1定义了graphql文档 createBob2定义了apollo变异 cr...