Skip to content

Commit

Permalink
allow open reads on Messages
Browse files Browse the repository at this point in the history
allow open reads on Messages, solves amazon-archives#6
  • Loading branch information
swyxio authored Dec 25, 2019
1 parent b37f4dc commit 5e8c63a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amplify/backend/api/allamplifychatt/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -58,4 +58,4 @@ type Subscription {
@aws_subscribe(mutations: ["createConvoLink"])
onCreateMessage(messageConversationId: ID!): Message
@aws_subscribe(mutations: ["createMessage"])
}
}

0 comments on commit 5e8c63a

Please sign in to comment.