Learn about the necessary cloud infrastructure resources on which the API project application relies on to perform graphql requests.
What you’ll learn
- how GraphQL HTTP requests are handled by the deployed cloud infrastructure and application code
For brevity, the diagram doesn’t include network-level cloud infrastructure resources, like region, VPC, availability zones, and so on. Check out the Deployment Modes section if you’re interested in that aspect of the deployed cloud infrastructure.
Note that the stateful resources like Amazon S3, Amazon Cognito, Amazon DynamoDB and Amazon ElasticSearch are deployed as part of the Core project application. These are still included in the diagram, just so it’s more clear to the reader.
(click to enlarge)
The diagram shows how HTTP requests (GraphQL queries and mutations) travel through the deployed cloud infrastructure. Request are primarily issued by the Admin Area, or Website applications, but of course, can be issued by other clients as well.
The flow consists of the following six steps:
- The GraphQL HTTP request first reaches the Amazon CloudFront
- The request is forwarded to the Amazon API Gateway
- The Amazon API Gateway invokes the GraphQL Handler AWS Lambda function
- Depending on the issued GraphQL operation, the AWS Lambda function’s code may issue one or more requests to other cloud infrastructure resources:
- Amazon Cognito
Dto perform identity authentication
- Amazon DynamoDB
Eor Amazon ElasticSearch Service Fto perform database queries
- Amazon Cognito
- Once the code execution has completed, an HTTP response is returned back to the Amazon API Gateway
- The Amazon API Gateway
Bforwards the request to the Amazon CloudFront A, which again forwards it back to the client.