FREEFirst project with us? Your landing page design is on the house.See the offer

Glossary · Astro and headless

What is GraphQL?

By Abdul QuadirUpdated Nov 2026
GraphQLnoun · Astro and headless

GraphQL is a query language for APIs. The client asks for exactly the fields it needs, in one request, and gets back only those fields.

GraphQL is a query language for APIs. The client asks for exactly the fields it needs, in one request, and gets back only those fields.

GraphQL, explained

Facebook built GraphQL and released it publicly in 2015. It is now used by many CMS and commerce platforms, including headless options such as Contentful and Shopify's Storefront API.

With a typical REST API, each endpoint returns a fixed shape, so you can end up with too much data or need several calls. A GraphQL query names its fields and can follow links in one go.

The API is described by a typed schema. That gives developers good tools, such as autocomplete and early errors when a query asks for a field that does not exist.

It is not free of downsides. Caching can be harder than with plain URLs, and the server needs protection from very expensive queries. For simple needs, REST is often enough.

In our work

How Kookies uses it

We use whichever API the platform does well. On Sanity builds that is usually GROQ, and on Shopify builds it can be the Storefront GraphQL API.

FAQs

GraphQL
questions.

Abdul Quadir
Still have a question?Ask us directly. We reply within a day.
Book a callPick a timehello@kookies.io

Neither is better in every case. GraphQL suits flexible data needs, and REST is simple and easy to cache.

Sanity's main query language is GROQ, and it also offers a GraphQL API.

No. It is a way to query an API, and the data can live anywhere.

Your turn

Let's kook
what you krave.

Hi Kookies, I need a built on . I'd love to launch . Reach me at
or book a callSent. We reply within one working day.