In the resolver for that onCreateMessageForMe, I am ttrying to query the UserChannelPermission table so I can check if the User is in the channel and filter accordingly.
So I set the data source to UserChannelPermissionTable, and set the request mapping to....
I am working on a messaging app with the following objects...
I create messages using the following...
createNewMessage(id: ID!, channelId: ID!, senderId: ID!, text: String): Message
And I have the following subscription...
onCreateMessageForMe: Message @aws_subscribe(mutations: ["createNewMessage"])
In the resolver for that onCreateMessageForMe, I am ttrying to query the UserChannelPermission table so I can check if the User is in the channel and filter accordingly. So I set the data source to UserChannelPermissionTable, and set the request mapping to....
And in my response mapping, I put something like this...
The filter works if I just hard code in a value. But beyond that I can't get it to work.