From 5e8c63a225a4334b2a15ded29c0e24ddee51f3fe Mon Sep 17 00:00:00 2001 From: swyx Date: Wed, 25 Dec 2019 12:57:55 -0500 Subject: [PATCH] allow open reads on Messages allow open reads on Messages, solves https://github.com/aws-samples/aws-appsync-chat/issues/6 --- amplify/backend/api/allamplifychatt/schema.graphql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amplify/backend/api/allamplifychatt/schema.graphql b/amplify/backend/api/allamplifychatt/schema.graphql index ebee544..760fd22 100644 --- a/amplify/backend/api/allamplifychatt/schema.graphql +++ b/amplify/backend/api/allamplifychatt/schema.graphql @@ -27,7 +27,7 @@ type Conversation type Message @model(subscriptions: null, queries: null) - @auth(rules: [{ allow: owner, ownerField: "authorId" }]) { + @auth(rules: [{ allow: owner, ownerField: "authorId", operations: [create, update, delete]}]) { id: ID! author: User @connection(name: "UserMessages", keyField: "authorId") authorId: String @@ -58,4 +58,4 @@ type Subscription { @aws_subscribe(mutations: ["createConvoLink"]) onCreateMessage(messageConversationId: ID!): Message @aws_subscribe(mutations: ["createMessage"]) -} \ No newline at end of file +}