Repository with sources and generator of https://larlet.fr/david/ https://larlet.fr/david/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.md 1.1KB

title: GraphQL et REST

Current REST APIs can be exposed to GraphQL clients by building a GraphQL server as a wrapper around the REST API. A client would talk to a GraphQL server which would translate the query to (multiple) REST APIs. Client only sends one request, and receives the smallest possible response it needs. The server has much better bandwidth so the extra queries are not so critical.

*GraphQL in the age of REST APIs* (cache)

C’est ma conclusion également, GraphQL (cache) est très pertinent pour tout ce qui est mashups là où les multiples requêtes HTTP (1.1) de REST sont beaucoup moins efficaces. On pourrait aussi envisager une API hybride qui combine le meilleur des deux mondes :

  • des ressources exposées en REST pour de l’unitaire ;
  • des points d’accès exposés en GraphQL pour les requêtes populaires.

Au prix des complexités à la fois côtés clients et serveur.