GraphQL

Backend

GraphQL is a query language for APIs; I know it and use it when connecting to services that offer it.

How I use GraphQL

The client asks for exactly the fields it needs in a single query, and the server returns data in that same shape.

When a service your site needs to work with offers GraphQL, I can connect to it directly: the app fetches only the data it needs, so responses are smaller, and screens that combine several kinds of data get everything from one query.

When working with GraphQL, I write queries with variables instead of pasting values into the query text, rely on the service's schema that describes the types, and check for errors inside the response itself, since GraphQL often returns a failed query with status 200. I don't run a GraphQL API in my own projects, so I count it among the tools I use less often.

In my own projects I usually build a REST API with Node.js, Express or FastAPI, or use Supabase, which exposes data through a ready-made API. For most sites and apps that's simpler to maintain.

Frequently asked questions about GraphQL

What is GraphQL?

GraphQL is a query language and API style where the client specifies exactly which fields it wants and the server returns only those. Everything goes through a single endpoint, and a schema describes the available data and types. It was developed at Facebook, and services such as GitHub and Shopify offer it today.

GraphQL vs REST: what's the difference?

REST has multiple endpoints, each returning a predefined shape of data, while GraphQL has one endpoint and the client picks the fields. GraphQL cuts down on over- and under-fetching, while REST is simpler to build and cache, which is plenty for most smaller projects.

Do you build GraphQL APIs?

Not as my first choice. I know GraphQL and connect to services that offer it, but in my own projects I usually build a REST API or use Supabase, and I don't have a portfolio project with my own GraphQL API.

All skills →