$30 off During Our Annual Pro Sale. View Details »

Modeling GraphQL APIs

Modeling GraphQL APIs

Renato Benkendorf

October 20, 2018
Tweet

More Decks by Renato Benkendorf

Other Decks in Technology

Transcript

  1. 1
    Modeling GraphQL APIs
    Renato Benkendorf

    View Slide

  2. 2
    @renatobenks

    View Slide

  3. 3

    View Slide

  4. 4

    View Slide

  5. 5
    Software Engineer
    @renatobenks

    View Slide

  6. 6
    Software Engineer
    @renatobenks
    creditas.com.br
    @CreditasBR
    Fintech
    Plataforma online
    Empréstimo com
    garantia

    View Slide

  7. 7

    View Slide

  8. 8
    Modeling GraphQL API's
    Renato Benkendorf

    View Slide

  9. 9
    Where it came from?

    View Slide

  10. 10

    View Slide

  11. 11
    Scaling GraphQL

    View Slide

  12. 12
    Scaling GraphQL
    1. to multiple clients
    2. cross-team

    View Slide

  13. 13
    Scaling GraphQL
    Aggregation layer (ESB, BFF, API Gateway, Orchestrator)

    View Slide

  14. 14
    Scaling GraphQL
    integrate business domains to the
    clients

    View Slide

  15. 15
    Scaling GraphQL

    View Slide

  16. 16
    Demystifying GraphQL

    View Slide

  17. 17
    Demystifying GraphQL
    QL (Query-Language)
    Graph

    View Slide

  18. 18
    Demystifying GraphQL
    Graph
    ● The objects
    are vertices or
    nodes.
    ● The links are
    edges.

    View Slide

  19. 19
    Demystifying GraphQL
    Query language
    (QL) refers to any
    computer
    programming
    language that
    requests and
    retrieves data by
    sending queries

    View Slide

  20. 20
    Demystifying GraphQL
    GraphQL
    ● The nodes are
    the object
    types.
    ● The edges are
    the fields.

    View Slide

  21. 21
    and what about modelling?

    View Slide

  22. 22

    View Slide

  23. 23
    Modeling a GraphQL API

    View Slide

  24. 24
    Modeling a GraphQL API
    data modelling

    View Slide

  25. 25
    Modeling a GraphQL API
    data
    modelling
    1. Using “endpoint style” rather than
    thinking in graphs
    2. Mapping their GraphQL schema
    directly to their database tables
    (foreign keys and all)
    3. Mapping their GraphQL schema
    directly to their back-end data model
    (eg. your model classes from your
    ORM or the like)

    View Slide

  26. 26
    Modeling a GraphQL API
    data
    modelling
    Using “endpoint
    style” rather than
    thinking in
    graphs

    View Slide

  27. 27
    Modeling a GraphQL API
    data
    modelling
    Using “endpoint
    style” rather than
    thinking in
    graphs

    View Slide

  28. 28
    Modeling a GraphQL API
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    database tables

    View Slide

  29. 29
    Modeling a GraphQL API
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    database tables

    View Slide

  30. 30
    Modeling a GraphQL API
    data
    modelling
    thinking in
    graphs

    View Slide

  31. 31
    Modeling a GraphQL API
    data
    modelling
    thinking in
    graphs

    View Slide

  32. 32
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    back-end data
    model
    Modeling a GraphQL API

    View Slide

  33. 33
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    back-end data
    model
    Modeling a GraphQL API

    View Slide

  34. 34
    Modeling a GraphQL API
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    back-end data
    model

    View Slide

  35. 35
    Modeling a GraphQL API
    data
    modelling
    Mapping their
    GraphQL schema
    directly to their
    back-end data
    model

    View Slide

  36. 36
    "With GraphQL, you model your business
    domain as a graph"
    Modeling a GraphQL API

    View Slide

  37. 37
    Use case

    View Slide

  38. 38

    View Slide

  39. 39
    Use case
    current
    scenario
    ● domain business currently is servicing
    ● domain data in redux
    ● mapping the boundaries

    View Slide

  40. 40
    Use case
    next
    challenges
    ● app cross-squad
    ● app composition
    ● manage a lot of data from different
    domains

    View Slide

  41. 41
    Temos vagas
    vagas.creditas.com.br

    View Slide

  42. 42
    Thanks!

    View Slide