update manually in the React component
I've been thinking about this approach for a few things. One way that could help both hydrate a query before initial load, and also deal with optimistic responses is if there was a way to pass in an initial state until the authoritative data from the server can replace.
eg:
const message = useQuery('message', messageId).hydrate(messageFixture)
That way when there is a local optimistic change, I could just update what I'm hydrating with.
Additionally this deals with another scenario I'm wrestling with. Lets say we have a list view and a detail view. If a user is coming from a list item to its respective detail view, I have the data (or the majority of the data) and the query can be hydrated from that. But if the user is coming from another entrypoint into the view, I will need to fetch it from the server.