Skip to content
Teknik

What is GraphQL?

An alternative to REST APIs. You request exactly the data you want — no more, no less.

GraphQL is a way for apps and websites to fetch data from a server, where you ask for exactly the information you want — neither more nor less. It is an alternative to the classic approach (REST APIs) and gives you more precise control over what gets sent.

Think of the difference between a fixed set menu and a buffet where you put exactly what you want on your plate. With the old approach, you often get a ready-made portion with a little too much or too little. With GraphQL, you say exactly "I want the name and email of this customer, nothing else", and get precisely that back.

That means the app avoids fetching lots of unnecessary data it does not need, and avoids making many separate requests for different things. One well-formed query can fetch exactly what should appear on screen.

Why is GraphQL important for your business?

GraphQL can make your apps faster and smoother, because only necessary data is sent over the network. That is especially noticeable on mobile, where smaller data volumes mean faster loading and a better experience.

It also makes development more flexible. When the interface needs to show something new, the developer can often request the extra data directly, without rebuilding the whole system. That can save time and money as your product grows and changes.

GraphQL in practice

Say you have an app that shows a customer profile. With GraphQL, the app can fetch the customer's name, recent orders, and favourite products in a single query — exactly what should be visible — instead of making several separate calls and sifting through excess information.

If you then want to also show the customer's loyalty points, the developer can often just add that field to the query. No major rebuild — just a small adjustment to what the app asks for.

Common questions about GraphQL

What does GraphQL mean?

GraphQL is a query language and a way to fetch data from a server, where the app requests exactly the information it needs. It is a flexible alternative to traditional REST APIs.

What is the difference between GraphQL and REST?

With REST, you often get ready-made data packages from different addresses, sometimes with too much or too little data. With GraphQL, you formulate a query and get precisely the fields you want, in a single call.

Does my project need GraphQL?

It depends. GraphQL suits apps with complex or varied data and many screens. For simpler projects, a standard REST API may be perfectly adequate and quicker to get started with.

Related terms

← Full glossary