Skip to main content

Search

Reference documentation for GraphQL schema types in the Search category.

Queries

Query

Perform a search across resources, returning a maximum of 1,000 results.

Type: SearchResultItemConnection!

Arguments for search

NameDescription

after (String)

Returns the elements in the list that come after the specified cursor.

before (String)

Returns the elements in the list that come before the specified cursor.

first (Int)

Returns the first n elements from the list.

last (Int)

Returns the last n elements from the list.

query (String!)

The search string to look for. GitHub search syntax is supported. For more information, see "Searching on GitHub," "Understanding the search syntax," and "Sorting search results.".

type (SearchType!)

The types of search items to search within.

Objects

SearchResultItemConnection

Object

A list of results that matched against a search query. Regardless of the number of matches, a maximum of 1,000 results will be available across all types, potentially split across many pages.

Fields for SearchResultItemConnection

NameDescription

codeCount (Int!)

The total number of pieces of code that matched the search query. Regardless of the total number of matches, a maximum of 1,000 results will be available across all types.

discussionCount (Int!)

The total number of discussions that matched the search query. Regardless of the total number of matches, a maximum of 1,000 results will be available across all types.

edges ([SearchResultItemEdge])

A list of edges.

issueCount (Int!)

The total number of issues that matched the search query. Regardless of the total number of matches, a maximum of 1,000 results will be available across all types.

issueSearchType (IssueSearchType)

The type of search that was performed for issues (lexical, semantic, or hybrid).

lexicalFallbackReason ([LexicalFallbackReason!])

When a semantic or hybrid search falls back to lexical, the reasons why the fallback occurred.

nodes ([SearchResultItem])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.