Skip to content
Snippets Groups Projects

web: add `getGraphQLClient` to the `platformContext`

Created by: valerybugakov

Context

Preparation to land https://github.com/sourcegraph/sourcegraph/pull/23351. To leverage Apollo-Client cache in different parts of the app, we need to make it available everywhere without global imports. Similar to distributing the requestGraphql function, we can now access getGraphQLClient from the platformContext.

Changes

  • Added getGraphQLClient to the platformContext.
  • Added separate methods to initialize Apollo Client for the web app and the browser extension.
  • Updated default fetch policies for Apollo Client to avoid always serving stale cached data:

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading