【发布时间】:2021-05-21 16:50:11
【问题描述】:
我在 Amplify 中有一个带有简单模型的 graphql 架构。我收到错误“不能为不可为空的字段 Organisation.id 返回 null。”当我尝试获取有效 ID 时,为什么?
型号
type Organisation
@model
{
id: ID!
name: String!
}
查询:
const org = await API.graphql(graphqlOperation(getOrganisationQuery, { id: 'f18881fb-4cf3-42de-84b1-9396f932938d' }));
错误: 不能为不可为空的字段 Organisation.id 返回 null。
【问题讨论】:
标签: amazon-web-services graphql amazon-dynamodb aws-amplify