Open JonEsparaz opened 4 years ago
I think we can make a customMutation that merges more than one mutation into the same request. So createRoom(roomInfo, [users]) or something similar...
That's what I was thinking. Also, I think there's also a bottle neck loading all the messages. A @key
directive to get rooms by userID
is likely more performant than using filter: { userID: { eq: user['username'] } }
.
Sounds good...
I'm working on some VTL for a batch mutation.
Let me know if that worked...
Doesn't look like it worked (returns [null, null]). I think the issue might be the table name.
Is the table actually named "DirectMessageUser" or "DirectMessageUser-long string of chars"?
Yah, it has the long string of characters depending on which environment it is....
Can we try adding the full table name in the res/req files?
This post suggests that the full name is required: https://medium.com/@jan.hesters/creating-graphql-batch-operations-for-aws-amplify-with-appsync-and-cognito-ecee6938e8ee
Although the AWS Appsync docs I followed suggest otherwise: https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-dynamodb-batch.html#permissions
@itbel did you by chance do any of this as part of the DM improvement works?
Creating a new message room is painfully slow. This was mentioned in #243 (which was closed).
┆Issue is synchronized with this Wrike Task