API Stability Long-Term

The querySearchDomains() GraphQL query is used for query search domains with an organization filter.

For more information on searching repositories and views, see the Searching Data documentation page.

Syntax

Below is the syntax for the querySearchDomains() query field:

graphql
querySearchDomains(
     searchFilter: string
     typeFilter: SearchDomainTypes!
     sortBy: Searchdomain__SortBy!
     orderBy: OrderBy
     limitName: string
     skip: integer
     limit: integer
   ): SearchDomainSearchResultSet!

This query field has several inputs, but not all required — as indicated by the exclamation marks. The given and returned datatypes are described together in the next section. Below is an example of how this query field might be used:

Show:
graphql
query {
  querySearchDomains(
     searchFilter:"localhost", 
     typeFilter: All, 
     sortBy: Name, orderBy: DESC )
  { results {
      id, name, reposExcludedInSearchLimit, 
      users { id, username, displayName },
      totalResults }
}

Given and Returned Datatypes

The given datatype SearchDomainTypes is an enumerated list: All, Views, or repository(). The Searchdomain__SortBy is also an enumerated list of choices: Name, Volume, DeletedAt or LimitName.

The returned datatype SearchDomainSearchResultSet has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: SearchDomainSearchResultSet

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Oct 3, 2024
results[SearchDomain]yes Long-TermThe paginated results set. See SearchDomain.
totalResultsintegeryes Long-TermThe total number of matching results.