Skip to main content
GraphQL is a query language for APIs that allows you to request exactly the data you need. Unlike REST APIs, GraphQL gives you the flexibility to fetch multiple resources in a single request.

What is GraphQL?

GraphQL is a query language and runtime for executing queries against your data. It provides:
  • Single endpoint - All queries and mutations go through one endpoint
  • Flexible queries - Request only the fields you need
  • Strong typing - Schema defines all available data and operations
  • Introspection - Explore the API schema directly

Basic concepts

Queries

Queries are used to fetch data. They are read-only operations:

Mutations

Mutations are used to modify data (create, update, delete):

Fields

Fields represent the data you want to retrieve. You can request nested fields:

GraphQL vs REST

Next steps