You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/event_handler/appsync.md
+51-53
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,10 @@ You must have an existing AppSync GraphQL API and IAM permissions to invoke your
27
27
28
28
This is the sample infrastructure we are using for the initial examples with a AppSync Direct Lambda Resolver.
29
29
30
-
=== "schema.graphql"
30
+
???+ tip "Tip: Designing GraphQL Schemas for the first time?"
31
+
Visit [AWS AppSync schema documentation](https://docs.aws.amazon.com/appsync/latest/devguide/designing-your-schema.html){target="_blank"} for understanding how to define types, nesting, and pagination.
31
32
32
-
!!! tip "Designing GraphQL Schemas for the first time?"
33
-
Visit [AWS AppSync schema documentation](https://docs.aws.amazon.com/appsync/latest/devguide/designing-your-schema.html){target="_blank"} for understanding how to define types, nesting, and pagination.
@@ -176,7 +176,8 @@ You can define your functions to match GraphQL types and fields with the `app.re
176
176
177
177
Here's an example where we have two separate functions to resolve `getTodo` and `listTodos` fields within the `Query` type. For completion, we use Scalar type utilities to generate the right output based on our schema definition.
178
178
179
-
!!! info "GraphQL arguments are passed as function arguments"
179
+
???+ info
180
+
GraphQL arguments are passed as function arguments.
180
181
181
182
=== "app.py"
182
183
@@ -395,69 +396,65 @@ You can nest `app.resolver()` decorator multiple times when resolving fields wit
395
396
396
397
For Lambda Python3.8+ runtime, this utility supports async functions when you use in conjunction with `asyncio.run`.
Assuming you have [Amplify CLI installed](https://docs.amplify.aws/cli/start/install){target="_blank"}, create a new API using `amplify add api` and use the following GraphQL Schema.
426
425
427
426
<!-- AppSync resolver decorator is a concise way to create lambda functions to handle AppSync resolvers for multiple `typeName` and `fieldName` declarations. -->
[Create two new basic Python functions](https://docs.amplify.aws/cli/function#set-up-a-function){target="_blank"} via `amplify add function`.
458
455
459
-
!!! note "Amplify CLI generated functions use `Pipenv` as a dependency manager"
460
-
Your function source code is located at **`amplify/backend/function/your-function-name`**.
456
+
???+ note
457
+
Amplify CLI generated functions use `Pipenv` as a dependency manager. Your function source code is located at **`amplify/backend/function/your-function-name`**.
461
458
462
459
Within your function's folder, add Lambda Powertools as a dependency with `pipenv install aws-lambda-powertools`.
463
460
@@ -713,7 +710,8 @@ You can subclass `AppSyncResolverEvent` to bring your own set of methods to hand
713
710
714
711
### Split operations with Router
715
712
716
-
!!! tip "Read the **[considerations section for trade-offs between monolithic and micro functions](./api_gateway.md#considerations){target="_blank"}**, as it's also applicable here."
713
+
???+ tip
714
+
Read the **[considerations section for trade-offs between monolithic and micro functions](./api_gateway.md#considerations){target="_blank"}**, as it's also applicable here.
717
715
718
716
As you grow the number of related GraphQL operations a given Lambda function should handle, it is natural to split them into separate files to ease maintenance - That's where the `Router` feature is useful.
0 commit comments