sourcegraph
sourcegraph copied to clipboard
GraphQL Client adoption: Batch Changes
Plan
Weβre looking to increase adoption of Apollo Client across batch changes components.
The aim of this issue is to identify and eventually improve areas that:
- Would benefit from serving cached data. High-traffic areas where data is unlikely to change whilst the user is on the page.
- Would benefit from refactoring data fetching logic into a shared API. Some examples may be complicated RxJS code that could be abstracted, or usage of FilteredConnection that has proven difficult to modify previously.
Useful resources
- Migrating from
requestGraphQL | queryGraphQL | mutateGraphQLusage to useMutation and useQuery hooks. - Utilising the Apollo cache by adding the correct
idfields to queries or providing alternative keyFields to use. - Migrating from
FilteredConnectiontouseConnectionand abstract FilteredConnection UI components: https://github.com/sourcegraph/sourcegraph/commit/037dc8022ae8e0368e07131856c684715b731a1e
Please use this issue to discuss and identify these areas. Will create follow-on tickets to track implementation.
Tracked issues
@courier-new: 1.00d
- [ ] https://github.com/sourcegraph/sourcegraph/issues/22507 1.00d
Completed: 1.00d
- [x] (π 617 days ago) https://github.com/sourcegraph/sourcegraph/issues/24417 (PRs: ~#25378~, ~#25379~, ~#25381~) 1.00d