mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
Addresses [the issue](https://github.com/sourcegraph/sourcegraph/pull/48463#issuecomment-1454894102) spotted by @vovakulikov in https://github.com/sourcegraph/sourcegraph/pull/48463. - The Apollo Client cache persistor is updated to use the preloaded data on reads instead of only data available in `localStorage`. - The `temporarySettings` query is no longer persisted to the `localStorage`. ## Test plan Use repro instructions shared by @vovakulikov: 1. Read a temporary settings field, 2. See one value of this field (let's say we have a boolean flag, and its value is `true`). 3. Change this flag value from a different browser or via the API console (editTemporalSettings mutation). 4. Refresh the page and see that `window.context.temporarySettings` has a correct new value. 5. But `useTemporarySettings` returns the old value because it's using a cached value from the local storage that persistMapper provided for the Apollo cache. |
||
|---|---|---|
| .. | ||
| src | ||
| .eslintignore | ||
| .eslintrc.js | ||
| babel.config.js | ||
| BUILD.bazel | ||
| jest.config.js | ||
| OWNERS | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Http Client
Generic logic for sending and handling HTTP requests from our client applications.
Use the getGraphQLClient client utility to create an app-specific instance of the Apollo Client, which is the recommended way to interact with Sourcegraph API from web applications.