4. Marcia VillalbaServerless Architecture Conference
POST v1/order
POST v2/order
GET /order/{orderId}
GET /orderDescription/{orderId}
GET /orderItems/{orderId}
Lots of unnecessary information sent to client
Not matching objects
GET /order/{orderId}
GET /provider/{orderId}
GET /customer/{customerId}
Bad documentation
24. Marcia VillalbaServerless Architecture Conference
How graphql works?
2. Connect all the types
and fields to different
datasources
Videos table
Channels table
26. Marcia VillalbaServerless Architecture Conference
How graphql works?
4. The server fetches the
information from the
different datasources
Videos table
Channels table
28. Marcia VillalbaServerless Architecture Conference
What are datasources?
Can be anything!
•A Database
•Another service with an API
•A HTTP request that return data
•A call to a search service
•…
29. Marcia VillalbaServerless Architecture Conference
Resolvers
Provide the instructions
from turning GraphQL
operations into data
SQL database
HTTP service
noSQL database
33. Marcia VillalbaServerless Architecture Conference
Backend as a service (BAAS)
Backend as a service means a
generic application component
that is hosted by you or someone
else, that you can bundle into your
own application using an API.
34. Marcia VillalbaServerless Architecture Conference
Function as a service (FaaS)
•Born in 2014 with AWS Lambda
•Next evolution of cloud computing
•New way to execute and design applications
•Function as a service platform
36. Marcia VillalbaServerless Architecture Conference
Benefits of serverless
•Pay for what you use
•Not reinventing the wheel
•Fast development
•High integration with different services
•Not worrying about infra
•All about providing value
39. Marcia VillalbaServerless Architecture Conference
Graphql & serverless
Implement your own GraphQL server
Use an existing GraphQL server library
Use an existing GraphQL platform
55. Marcia VillalbaServerless Architecture Conference
Things to have in mind
•If you do a DynamoDB scan be careful of
performance
•Calling a cold AWS Lambda
•Doing an HTTP call ads latency to the response
•Think about when calling other services from AWS
Lambda how much latency you are adding to the
whole system
56. Marcia VillalbaServerless Architecture Conference
Conclusion
•Fast development
•Easily maintainable
•Secure applications
•Scalable applications
•Pay as much as we use
58. Marcia VillalbaServerless Architecture Conference
New course!
•Serverless Applications with GraphQL on AWS
•Follow me on twitter to get notified when it is out:
@mavi888uy