Thank for sharing.
In my case, I have a 1000 conversation in chat history and each conversation have multiple user
So If I using appsync as your post, I need to make 1000 subscription for each user (it's bad if I doing like that)
As I known that appsync is not support to subscription with array ID (onCreateMessage($messageConversationId: ID!))
So my solution for this case:
writing lambda function with name actionCreateMessage for mutation createMessage
Add type PubMessage {userId, message} with subscription and create mutation
actionCreateMessage will do:
getting list user of conversation
call createPubMessage for each user
in client using only one subscription onPubMessage(userId: ID!)
@dabit3
Could you help to advice me ? Is there any better solution for that used appsync ?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank for sharing.
In my case, I have a 1000 conversation in chat history and each conversation have multiple user
So If I using appsync as your post, I need to make 1000 subscription for each user (it's bad if I doing like that)
As I known that appsync is not support to subscription with array ID (onCreateMessage($messageConversationId: ID!))
So my solution for this case:
@dabit3 Could you help to advice me ? Is there any better solution for that used appsync ?