Hello team,
I'm using aws amplify in my android application. For the first time the data store query returning the results very slow and Observer is always delay to return the data. I'm using latest version of amplify 2.14.11. Can any one give what is the problem.
Below i will give my schema
type Message @model @auth(rules: [{ allow: private }])
{
id: ID!
type: Int!
content: String!
senderId: Int!
senderName: String!
groupId: String! @index(name:"byGroup", sortKeyFields: ["sentAt"])
groupName: String!
status: MessageStatus!
role: String
tag: String
comment: String
sentAt: AWSDateTime!
orgId: Int! @index(name:"byOrgId")
recipients: [MessageRecipient] @hasMany(indexName: "byMessage", fields: ["id"])
permittedTo: [String!]
}
type MessageRecipient @model @auth(rules: [{ allow: private }])
{
id: ID!
messageId: ID! @index(name:"byMessage")
groupId: String! @index(name: "byGroup")
userId: Int! @index(name:"byUser")
status: MessageStatus!
sentAt: AWSDateTime!
readAt: AWSDateTime
permittedTo: [String!]
}
MessageRecipient for Observer and Message model for DataStore query