Skip to content

graphqlbackend: add searchFilterSuggestions and update search APIs

Warren Gifford requested to merge jc/rfc14 into master

Created by: unknwon

This PR includes changes of backend (i.e. GraphQL APIs) as part of RFC 14: Improve autocomplete suggestions.

  • Web team please review changes related to GraphQL API.
  • Core services team please review all changes.

Two major changes:

  1. Added searchFilterSuggestions API for preloading available search filters and their default suggestions when backfill.
  2. Updated search API, in particular, the suggestions node to add language suggestions for the search filter lang: when repo: filter is explicitly specified (as a performant way to only process one repository for quicker suggestion).

Other:

  • Please ignore changes in the file web/src/search/input/Suggestion.tsx, as these changes are for the very purpose of compromising CI tests since we don't have corresponding frontend code in place, and are meant reverted before merging.

Test plan:

  • Unit tests are added for search and searchFilterSuggestions APIs.
  • I will add unit tests for searchFilterSuggestions API once got approval of this API design and implementation from the team.

Merge request reports

Loading