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

Building Modern GraphQL APIs

Building Modern GraphQL APIs

GraphQL Introduction and Building GraphQL API using AWS AppSync

376cdd7c5a8c17f833398ee45543a3c5?s=128

Pradheepa P

June 11, 2021
Tweet

Transcript

  1. None
  2. None
  3. Agenda • REST and GraphQL • What is GraphQL •

    AWS AppSync • Build a GraphQL API @womenwhocode #WWCode
  4. REST and GraphQL API @womenwhocode #WWCode

  5. REST and GraphQL - A Burger Comparison @womenwhocode #WWCode

  6. REST API Request @womenwhocode #WWCode Pic Courtesy : https://phpenthusiast.com/blog/what-is-rest-api

  7. GraphQL API Request @womenwhocode #WWCode Pic Courtesy:https://www.tutorialspoint.com/

  8. REST Github API Response @womenwhocode #WWCode

  9. GraphQL Github API Response @womenwhocode #WWCode

  10. Short Summary • GraphQL is an APIs just like RESTful.

    • Ask for what you want. • Use only POST to send data. • Get Predictable Results. @womenwhocode #WWCode
  11. GraphQL Server @womenwhocode #WWCode

  12. GraphQL Server comprises of @womenwhocode #WWCode 1. GraphQL schema –

    API or application data defined and modeled in a GraphQL schema definition language (SDL). 2. Resolvers – business logic linking or “resolving” types/fields defined in the GraphQL schema with the data in the data sources.
  13. GraphQL Schema @womenwhocode #WWCode

  14. GraphQL Operations @womenwhocode #WWCode - Query (GET) - Subscription -

    Mutation (PUT/DELETE)
  15. Benefits • No over/under fetching of data. • Predefined Schema

    Definition. • Strongly typed. • Documentation support via the Schema doc. @womenwhocode #WWCode
  16. GraphQL is a query language for APIs and a runtime

    for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. - - graphql.org @womenwhocode #WWCode
  17. Build a GraphQL API server @womenwhocode #WWCode

  18. Design Considerations • Efficiency • Security • Caching • Monitoring

    • Documentation • Database Integration • Real-time updates ... @womenwhocode #WWCode
  19. What if it’s all are provided and managed? @womenwhocode #WWCode

  20. The answer is AWS AppSync @womenwhocode #WWCode

  21. GraphQL Server consists of @womenwhocode #WWCode

  22. AWS AppSync • Define Schema • Attach Datasource • Create

    Resolvers @womenwhocode #WWCode
  23. Demo... @womenwhocode #WWCode

  24. Questions ? @womenwhocode #WWCode

  25. References https://aws.amazon.com/appsync/blog https://pradheepa.medium.com/lambda-data-source-in-aws-appsync-using- serverless-framework-2f20ee3ed8aa Github : pradheepap Twitter: @pradheepa Website

    : www.pradheepa.com @womenwhocode #WWCode
  26. None