Skip to content

Search contexts selector: Serve cached data instead of refetching

Created by: umpox

We should cache the result of the search contexts query so we can immediately serve data to the user and they do not have to wait/see a loading spinner.

  1. Go to https://sourcegraph.com/search
  2. Load search contexts selector
  3. Try closing and reopening
  4. Notice that data isn't cached, and has to be refetched and loaded

Refactoring this to use the Apollo cache would bring a nice performance boost to this component