Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

allow open reads on Messages so that syncs can sync other people's messages #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])
}
}