The built in syncedFetch and synced plugins should include all you need for remote sync, but this plugin can help when integrating into or migrating from an existing Query-based infrastructure.
This plugin takes all of the normal Query parameters, but it updates an observable instead of triggering a re-render. The queryKey can be a function that returns a key array dependent on some observabes. If those observables change it will update the queryKey and re-run with the new key. That makes it super easy to do pagination, for example.
There are two ways to use this plugin:
1. React Hook
The useObservableSyncedQuery hook takes the normal Query parameters for the query and mutation, and additionally just needs a queryClient.
2. Outside of React
syncedQuery takes the normal Query parameters for the query and mutation, and additionally just needs a queryClient. It uses @tanstack/query-core and does not need to be used within React components.