Advanced GraphQL Queries

Learn about advanced GraphQL querying capabilities and how to provide parameters, use fragments, and more.

Parameters in queries

So far, we’ve sent GraphQL to get information about a particular object—a currently logged-in user. But what if we have multiple objects of the same type on a server? How do we specify the object we want to fetch? For example, how would we get information about a particular GitHub repository?

In GitHub’s API, we can do this using the repository query. Here is how it’s defined in the GraphQL schema:

Get hands-on with 1200+ tech skills courses.