Skip to content

GraphQL Client: Add Apollo and use on profile settings page

Administrator requested to merge tr/add-apollo into main

Created by: umpox

This PR:

  • Adds Apollo Client.
  • Adds typescript-react-apollo to automatically generated typed query and mutation hooks. https://github.com/sourcegraph/sourcegraph/pull/22380
  • Adds support and encourages writing queries in .graphql files, relying on generated code for initial logic https://github.com/sourcegraph/sourcegraph/pull/22380
  • Updates EditUserProfileForm to fire mutations through Apollo and respond accordingly.
  • Updates UserSettingsProfilePage to fire queries through Apollo and demonstrate how response data can be shared across components. Also adds tests for this page as an example for mocking different requests.
  • Adds and updates our web 'Working with GraphQL' documentation.

This PR is structured into specific commits to make reviewing easier

closes https://github.com/sourcegraph/sourcegraph/issues/22150 closes https://github.com/sourcegraph/sourcegraph/issues/22151

Merge request reports

Loading