Upgrade to Pro — share decks privately, control downloads, hide ads and more …

decouvrez Tartiflette à travers la creation d'une Open Data API

decouvrez Tartiflette à travers la creation d'une Open Data API

Stan Chollet

February 07, 2019
Tweet

More Decks by Stan Chollet

Other Decks in Technology

Transcript

  1. © 201 8 CO N FI D E N TI

    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 } + +
  2. © 201 8 CO N FI D E N TI

    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
  3. © 201 8 CO N FI D E N TI

    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.
  4. © 201 8 CO N FI D E N TI

    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” }
  5. © 201 8 CO N FI D E N TI

    A L Améliorons l’expérience utilisateur de l’Open Data API d'Orléans Métropole TART I FL ET T E E VE RYWHE R E Avec Tartiflette et GraphQL … 6
  6. © 201 8 CO N FI D E N TI

    A L 7 API Rest Database (MySQL) Fichier JSON / CSV Services tiers GraphQL G RAP HQ L A S PAT TE R N GAT E WAY
  7. © 201 8 CO N FI D E N TI

    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” }
  8. © 201 8 CO N FI D E N TI

    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” }
  9. © 201 8 CO N FI D E N TI

    A L 1 0 Où est ce beau projet ? Retrouvez les exemples de ce talk sur github https://github.com/tsunammis/tartiflette-graphql-odata-orleans
  10. © 201 8 CO N FI D E N TI

    A L 1 1 Merci ! 25 Star Suivez nous sur github https://github.com/dailymotion/tartiflette