I'm trying to create a chat using relay graphql and react-native-gifted-chat. The problem I have is refreshing the query with each message both from me and other participants. The query already includes pagination, but I don't really know how to handle subscriptions. Is useSubscribeToInvalidationState
good for this case, or would you recommend something else? Do you have any useful examples for that?
Asked
Active
Viewed 123 times
0

user11569827
- 165
- 1
- 9
-
Do you mean that you have to manually refresh to see the new messages? – Moritz Mahringer Jun 24 '21 at 02:49
-
It wasn't mentioned in the docs, but in the end using edges and inserting new messages with insertEdgeAfter was the right thing – user11569827 Jul 15 '21 at 12:33