# Recherche

Documentation de référence sur les types du schéma GraphQL dans la catégorie de recherche.

## search - query

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

**Type:** SearchResultItemConnection!

### Arguments for `search`

* `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.

## SearchResultItem - union

The results of a search.

### Possible types for `SearchResultItem`

* App
* Discussion
* Issue
* Organization
* PullRequest
* Repository
* User

## 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`

* `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.
* `nodes` ([SearchResultItem]): A list of nodes.
* `pageInfo` (PageInfo!): Information to aid in pagination.
* `repositoryCount` (Int!): The total number of repositories that matched the search query. Regardless of
the total number of matches, a maximum of 1,000 results will be available
across all types.
* `userCount` (Int!): The total number of users that matched the search query. Regardless of the
total number of matches, a maximum of 1,000 results will be available across all types.
* `wikiCount` (Int!): The total number of wiki pages that matched the search query. Regardless of
the total number of matches, a maximum of 1,000 results will be available
across all types.

## SearchResultItemEdge - object

An edge in a connection.

### Fields for `SearchResultItemEdge`

* `cursor` (String!): A cursor for use in pagination.
* `node` (SearchResultItem): The item at the end of the edge.
* `textMatches` ([TextMatch]): Text matches on the result found.

## SearchType - enum

Represents the individual results of a search.

### Values for `SearchType`

* `DISCUSSION`: Returns matching discussions in repositories.
* `ISSUE`: Returns results matching issues in repositories.
* `ISSUE_ADVANCED`: Returns results matching issues in repositories.
* `REPOSITORY`: Returns results matching repositories.
* `USER`: Returns results matching users and organizations on GitHub.

## TextMatch - object

A text match within a search result.

### Fields for `TextMatch`

* `fragment` (String!): The specific text fragment within the property matched on.
* `highlights` ([TextMatchHighlight!]!): Highlights within the matched fragment.
* `property` (String!): The property matched on.

## TextMatchHighlight - object

Represents a single highlight in a search result match.

### Fields for `TextMatchHighlight`

* `beginIndice` (Int!): The indice in the fragment where the matched text begins.
* `endIndice` (Int!): The indice in the fragment where the matched text ends.
* `text` (String!): The text matched.