A L Pourquoi GraphQL ? Récupération uniquement ce qui est demandé Tolérance aux erreurs Schema fortement typé Récupération de plusieurs types de donnée dans la même requête G RAP HQ L F T W 2 type Recipe { name: String! ingredients: [ingredient] cookingProcess: String } + +
A L Les aléas de l’Open Source TARTI F L ET T E O R IG I N 3 Mise en production de l’API GraphQL Changement de business model pour Graphene Début des développements de Tartiflette Début des développements de l’API GraphQL SEP 16 JAN 18 JUIN 17 JUIN < DEC 17 Mise en production de Tartiflette chez Dailymotion DEC 18 Version stable de Tartiflette (sans le support des subscriptions) JAN 19
A L • Simple et facile d’utilisation • Séparation entre le schema et l’implémentation à l’aide du SDL • Extensible grâce aux directives • Construit avec le mindset Python (pas un simple port de la librairie GraphQL JS) TART I FL ET T E O R IG I N 4 Tartiflette: Les raisons pour lesquelles nous allez l’adorer.
A L TARTI F L ET T E L A R EC E T T E 5 Schema (SDL) Resolver Transport type Recipe { name: String! ingredients: [ingredient] cookingProcess: String } @Resolver("Query.recipe") async def resolver_hello(parent, args, ctx, info): return { “name”: “tartiflette”, “ingredients: [“potatoes”, “…”] } 1. 2. 3. { “name”: “tartiflette”, “ingredients: [“potatoes”, “onion”, “cheese”], “cookingProcess”: “30 minutes au four” }
A L TARTI F L ET T E L A R EC E T T E 8 Schema (SDL) Resolver Transport type Recipe { name: String! ingredients: [ingredient] cookingProcess: String } @Resolver("Query.recipe") async def resolver_hello(parent, args, ctx, info): return { “name”: “tartiflette”, “ingredients: [“potatoes”, “…”] } 1. 2. 3. { “name”: “tartiflette”, “ingredients: [“potatoes”, “onion”, “cheese”], “cookingProcess”: “30 minutes au four” }
A L TARTI F L ET T E L A R EC E T T E 9 Schema (SDL) Resolver Transport type Recipe { name: String! ingredients: [ingredient] cookingProcess: String } @Resolver("Query.recipe") async def resolver_hello(parent, args, ctx, info): return { “name”: “tartiflette”, “ingredients: [“potatoes”, “…”] } 1. 2. 3. { “name”: “tartiflette”, “ingredients: [“potatoes”, “onion”, “cheese”], “cookingProcess”: “30 minutes au four” }