Skip to content
micro-frontend.dev 2.0

GraphQL APIs

Author: Natalia Venditto

Date First Published: Wed Jan 04 2023

What are APIs built with GraphQL?

GraphQL is not an API paradigm, but a query language specially developed for APIs, that allows developers to define a schema for their data using native types object types -like scalars- or custom types. Developers can then query the data using a resolver function, that can be native or custom. To implement a GraphQL interface, you need to install a GraphQL client and router that will provide a set of tools and runtime for the API queries.

The most well known GraphQL client is Apollo, although there are other libraries, and even cloud provider specific implementations. These implementations act as a proxy between the application and the data layer, typically providing an SDK to query a database, directly from the frontend.

A GraphQL client can be easily integrated with any frontend application and run on a serverless function or execution context, which makes it perfectly suited for a composable decoupled architecture.

Pros and Cons of GraphQL APIs