0
I’m using the experimental version of graphql and apollo client together with next13 and at one point in my code I perform a mutation in a client side component to delete data and I need the query that was performed in a server side component to be re-done for the list of results to be updated. How can I do this?
i am using the following code to do the queries and mutations in the server side components:
const {data: userEvents} = await getClient().query()
and the following code in client components:
const [deleteEvent] = useMutation(DeleteEvent, { refetchQueries: [ { query: getAllUserEvents, variables: { userId: session?.user.id } } ] })
I need that when I perform the deletion mutation on the client side component the search query on the server side component is re-done.
|