Search⌘ K

Queries and Organizations

Explore querying GitHub organizations using GraphQL by passing arguments to fetch specific data. Learn to use aliases to request multiple similar objects without conflicts and apply fragments to reuse fields efficiently. Understand how these features enhance querying flexibility and reduce repetition.

GitHub Organization

While a good way to learn how to write queries, accessing data about oneself isn’t too beneficial. So, how do we request data from other sources? Let’s find out using GitHub’s public organizations.

Organizations are shared accounts where groups of people can collaborate across multiple projects at once.

To specify a GitHub organization, you can pass an argument to a field:

Node.js
{
organization(login: "the-road-to-learn-react") {
name
url
}
}

Identifying an Organization

When using GitHub’s API, you can identify an ...