updateQueries after GraphQL mutation not working with the Apollo client
After I'm sending a createMessage mutation in my app, I want to update the local ApolloStore using updateQueries . My setup looks as follows: const ChatWithAllMessages = graphql(allMessages, {name: 'allMessagesQuery'})(Chat) export default graphql(createMessage, { props({ownProps, mutate}) { return { createMessageMutation(text, conversationId) { return mutate({ variables: { text, conversationId }, updateQueries: { allConversations: (previousState, {mutationResult}) => { console.log('Chat - did send mutation for allConversationsQuery: ', previousState, mutationResult) return ... } } }) } } } })