Retry individual queries in schema sync process
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 108
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 7
Description
The schema sync process contains many separate individual queries that are all combined as the schema sync. Today, we use Tanstack Query as the wrapper around the entire schema sync process. If one sub-query fails, the entire schema sync process is aborted and retried.
## Potential solution
Since each query could fail transiently (out of memory, timeout, etc) it would be nice to have a retry at the query level. We can use `queryClient.fetchQuery()` to perform the queries with a retry. This will also allow the individual queries to be cached so that if the entire schema sync fails, when it is retried only the failing individual queries need to be executed.
This should make the reliability of the schema sync process better in cases where the error encountered is transient in nature.
Contributor guide
Research direction
Start by locating the schema sync process and its current TanStack Query wrapper. Trace how the separate individual queries are combined, then evaluate the queryClient.fetchQuery() approach for per-query retries and caching. Done means transient failures retry at the individual-query level and a failed full sync can reuse successful cached queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100