Publicamos atualizações frequentes em nossa documentação, e a tradução desta página ainda pode estar em andamento. Para obter as informações mais recentes, acesse a documentação em inglês. Se houver problemas com a tradução desta página, entre em contato conosco.

Esta versão do GitHub Enterprise será descontinuada em Esta versão do GitHub Enterprise foi descontinuada em 2020-08-20. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, melhorar a segurança e novos recursos, upgrade to the latest version of GitHub Enterprise. Para ajuda com a atualização, contact GitHub Enterprise support.

Versão do artigo: Enterprise Server 2.18

About the GraphQL API

The GitHub GraphQL API offers flexibility and the ability to define precisely the data you want to fetch.

Neste artigo

Visão Geral

Here are some quick links to get you up and running with the GraphQL API v4:

About GraphQL

The GraphQL data query language is:

  • A specification. The spec determines the validity of the schema on the API server. The schema determines the validity of client calls.

  • Strongly typed. The schema defines an API's type system and all object relationships.

  • Introspective. A client can query the schema for details about the schema.

  • Hierarchical. The shape of a GraphQL call mirrors the shape of the JSON data it returns. Nested fields let you query for and receive only the data you specify in a single round trip.

  • An application layer. GraphQL is not a storage model or a database query language. The graph refers to graph structures defined in the schema, where nodes define objects and edges define relationships between objects. The API traverses and returns application data based on the schema definitions, independent of how the data is stored.

Why GitHub is using GraphQL

GitHub chose GraphQL for our API v4 because it offers significantly more flexibility for our integrators. The ability to define precisely the data you want—and only the data you want—is a powerful advantage over the REST API v3 endpoints. GraphQL lets you replace multiple REST requests with a single call to fetch the data you specify.

For more details about why GitHub has moved to GraphQL, see the original announcement blog post.

About the GraphQL schema reference

The docs in the sidebar are generated from the GitHub GraphQL schema. All calls are validated and executed against the schema. Use these docs to find out what data you can call:

You can access this same content via the Explorer Docs sidebar. Note that you may need to rely on both the docs and the schema validation to successfully call the GraphQL API.

For other information, such as authentication and rate limit details, check out the guides.

Requesting support

For questions, bug reports, and discussions about aplicativo GitHubs, aplicativo OAuths, and API development, explore the Fórum de Suporte e Desenvolvimento de API GitHub. The forum is moderated and maintained by GitHub Enterprise staff, but questions posted to the forum are not guaranteed to receive a reply from GitHub Enterprise staff.

Consider reaching out to GitHub Support directly using the contact form for:

  • guaranteed response from GitHub Enterprise staff
  • support requests involving sensitive data or private concerns
  • feature requests
  • feedback about GitHub Enterprise products

Pergunte a uma pessoa

Não consegue encontrar o que procura?

Entrar em contato