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

API is not returning all messages in conversation #6

Description

@ggros

when calling getConvo, the messages returned are filtered with author==currentUser
Thus once we close the conversation and re-open later, we can only see our own messages.

Issue is due to the @auth in the graphql schema filtering the "type Message"
I would suggest to leave the read open as there are no direct query on Message, always thru connections

type Message 
  @model(subscriptions: null, queries: null) 
  @auth(rules: [{ allow: owner, ownerField: "authorId", operations: [create, update, delete]}]) {
  id: ID!
  author: User @connection(name: "UserMessages", keyField: "authorId")
  authorId: String
  content: String!
  conversation: Conversation! @connection(name: "ConvoMsgs")
  messageConversationId: ID!
	createdAt: String
	updatedAt: String
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions