【发布时间】:2022-08-18 11:52:30
【问题描述】:
这是我的架构:
type Session @model @auth(rules: [{allow: public},{ allow: owner }, { allow: groups, groups: [\"Admin\"] }]) {
sessionId: ID! @primaryKey
numPeoplePresent: Int
procedures: Procedures @hasOne
notes: String
cattle: [Cow] @manyToMany(relationName: \"CowSessions\")
}
这是我看到的错误:
errors: [Amplify.GraphQLError(message: \"Validation error of type FieldUndefined: Field \\\'id\\\' in type \\\'Session\\\' is undefined @ \\\'onCreateSession/id\\\'\", locations: nil, path: nil, extensions: nil)]
Recovery suggestion: The list of GraphQLError contains service-specific messages
我认为将 sessionId 作为主键将取代对 id 字段的需求,但我错了吗?
标签: amazon-web-services amazon-dynamodb aws-amplify aws-appsync