Files
TechradarDev/radar/2019-11-01/graphql.md
Daniel Pötzinger bcf1ead9b3 documentation: Add tags to all featured blibs (#139)
* documentation: add tags to all featured blips
2022-11-18 11:39:23 +01:00

1.4 KiB

title, ring, quadrant, tags
title ring quadrant tags
GraphQL adopt methods-and-patterns
architecture

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.

GraphQL was developed by Facebook around 2010 and releases 2015. The main challenge it solves is to improve communication between browser and server on high dynamic web apps.

The advantages are:

  • schema and schema validation together with a useful type system
  • the client (browser) controls what data should be sent (data reduction)
  • with one request you can fetch "all" required data

We are using it together with Apollo Client in our React.js based frontend. This way the React components have their relevant GraphQL snippet, defining what data they request or mutate from the "backend for frontend", directly coupled. That makes it transparent what data is available. Apollo takes care of sending an aggregated GraphQL query to the backend.

The framework Flamingo offers support for GraphQL and also Flamingo Commerce offers a full featured GraphQL API for e-commerce features. (Example GraphQL Console for Commerce)