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

INTERFACE by apidays 2023 - GraphQL's second ac...

INTERFACE by apidays 2023 - GraphQL's second act, Jesse Martin, Hasura

INTERFACE by apidays 2023
APIs for a “Smart” economy. Embedding AI to deliver Smart APIs and turn into an exponential organization
June 28 & 29, 2023

GraphQL's second act, the unified data layer
Jesse Martin, Senior Developer Advocate at Hasura

------

Check out our conferences at https://www.apidays.global/

Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8

Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io

Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/

apidays

July 11, 2023
Tweet

More Decks by apidays

Other Decks in Programming

Transcript

  1. @motleydev whoami • Senior Sales Engineer at Hasura • GraphQL

    Educator for 5+ years • Ex Digital Strategy, Branding, Consultant • 4x Dad
  2. @motleydev whois hasura.io • Open source engine that can instantly

    convert database schemas to GraphQL schemas and create SQL from from GraphQL queries. • It creates an API for your data with very robust access controls. • Supports custom business logic, ephemeral models, event triggers, REST APIs, and more. • Is hiring. 😉
  3. @motleydev Fortune 500 Companies and Fast Growing Startups love Hasura

    • Build new applications or add new features to an existing application • Modernize existing applications within a shorter timeframe • Replace direct database access with a scalable, performant and secure data API to create a uni fi ed and federated “Core Data Service”
  4. @motleydev Assumptions • You know a little about what GraphQL

    is • You are aware some people get angry about silly things
  5. @motleydev User Scooter Coffee Loyalty Status Battery Status Charge Stall

    Coffee Shop Location Weather Menu Orders Date Recommendation Engine
  6. @motleydev • Less overhead for orchestrating services • Smaller control

    plane • Reusable patterns • Agnostic consumers Benefits of this approach
  7. Mutations / Writes Queries / Reads Common GraphQL service structure

    User Order Product Login / Logout Purchase Edit Microservice REST SQL REST SQL SQL
  8. @motleydev Data dependencies User Order Product Purchase GET /user GET

    /order GET /product POST /graphql { user { order { product { …info } } } }
  9. @motleydev Less abstract Pending purchases Historical income / expense History

    of returns Risk Assessment Network credit average Economic variables
  10. @motleydev Less abstract Pending purchases Historical income / expense History

    of returns Risk Assessment Network credit average Economic variables REST SDK REST SDK REST
  11. @motleydev • It’s not what GraphQL was 
 created for.

    • No, but it is what it was 
 designed for. • What about latency? • Marginally higher than optimally designed REST alternatives. 
 Also a solvable problem.
  12. @motleydev Model driven • 100% Declarative • The model de

    fi nes your data’s affordances (summable, group- able, etc) • The model de fi nes it’s relations and shapes.
  13. @motleydev Model driven • GraphQL Agnostic • The tooling converts

    the model to an API. • Actually, it’s what we’ve always been doing.