After posting or editing a comment, or after posting a review, data should
refetch so the new comment is visible.
Instructions to agents
When implementing this, evaluate how straightforward it would be to first do an
optimistic update after the API call succeeds with
queryClient.setQueryData(key, data => { ...data, new_properties }), then call
queryClient.invalidateQueries(key). Summarize how hard that would be and ask
the user to decide if the optimistic update is worth doing. If the user decides
it's not worth it, it's acceptable to just call
queryClient.invalidateQueries().
After posting or editing a comment, or after posting a review, data should
refetch so the new comment is visible.
Instructions to agents
When implementing this, evaluate how straightforward it would be to first do an
optimistic update after the API call succeeds with
queryClient.setQueryData(key, data => { ...data, new_properties }), then callqueryClient.invalidateQueries(key). Summarize how hard that would be and askthe user to decide if the optimistic update is worth doing. If the user decides
it's not worth it, it's acceptable to just call
queryClient.invalidateQueries().