Open Usmaelabdureman opened 1 year ago
I have this same issue as well, any update? Cheers
Hey, this is how i workaround that... Ref: https://docs.amplify.aws/gen1/javascript/tools/cli/migration/transformer-migration/
type BookOrder @model(queries: null, subscriptions: null) @key(name: "byBook", fields: ["book_id", "order_id"]) @key(name: "byOrder", fields: ["order_id", "book_id"]) @auth( rules: [
{ allow: owner, identityClaim: "email", ownerField: "customer" }
{ allow: groups, groups: ["Admin"] }
]
type BookOrder @model(queries: null, subscriptions: null) @auth( rules: [
{ allow: owner, identityClaim: "email", ownerField: "customer" }
{ allow: groups, groups: ["Admin"] }
]
In this updated schema, the @index directives are applied to the book_id and order_id fields, creating secondary indexes byBook and byOrder that you can use to query BookOrder records by book_id and order_id, respectively. The @belongsTo directives establish one-to-one connections between BookOrder and Book, and between BookOrder and Order
Can anyone solved this issues?
🛑 Your GraphQL Schema is using "@connection", "@key" direct ives from an older version of the GraphQL Transformer. Visit https://docs.amplify.aws/cli/migration/transformer-migratio n/ to learn how to migrate your GraphQL schema.