The updateQuery is something I use a lot while developing in React. I find it particularly useful because, in many cases, it eliminates the need to use readQuery and writeQuery. I just created a function that calls the existing updateQuery function in the ObservableQuery and returned it in the useQuery, so the cache of a query can be modified like this:
The
updateQuery
is something I use a lot while developing in React. I find it particularly useful because, in many cases, it eliminates the need to usereadQuery
andwriteQuery
. I just created a function that calls the existingupdateQuery
function in theObservableQuery
and returned it in theuseQuery
, so the cache of a query can be modified like this: