Skip to content

Commit cf80289

Browse files
dreamorosiAndrea Amorosileandrodamascena
authored
docs(event-handler): remove Amplify transformers section (#6937)
* docs(event-handler): remove Amplify transformers section * Update appsync.md Co-authored-by: Leandro Damascena <lcdama@amazon.pt> Signed-off-by: Andrea Amorosi <dreamorosi@gmail.com> --------- Signed-off-by: Andrea Amorosi <dreamorosi@gmail.com> Co-authored-by: Andrea Amorosi <aamorosi@amazon.es> Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
1 parent 20dc3a2 commit cf80289

7 files changed

+2
-210
lines changed

docs/core/event_handler/appsync.md

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: GraphQL API
33
description: Core utility
44
---
55

6-
Event Handler for AWS AppSync and Amplify GraphQL Transformer.
6+
Event Handler for AWS AppSync GraphQL APIs simplifies routing and processing of events in AWS Lambda functions by allowing you to define resolvers for specific GraphQL types and fields.
77

88
```mermaid
99
stateDiagram-v2
@@ -46,7 +46,7 @@ stateDiagram-v2
4646

4747
**[Direct Lambda Resolver](https://docs.aws.amazon.com/appsync/latest/devguide/direct-lambda-reference.html){target="_blank"}**. A custom AppSync Resolver to bypass the use of Apache Velocity Template (VTL) and automatically map your function's response to a GraphQL field.
4848

49-
**[Amplify GraphQL Transformer](https://docs.amplify.aws/cli/graphql-transformer/function){target="_blank"}**. Custom GraphQL directives to define your application's data model using Schema Definition Language _(SDL)_, _e.g., `@function`_. Amplify CLI uses these directives to convert GraphQL SDL into full descriptive AWS CloudFormation templates.
49+
**[Batching resolvers](https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#advanced-use-case-batching){target="_blank"}**. A technique that allows you to batch multiple GraphQL requests into a single Lambda function invocation, reducing the number of calls and improving performance.
5050

5151
## Getting started
5252

@@ -170,55 +170,6 @@ For Lambda Python3.8+ runtime, this utility supports async functions when you us
170170
--8<-- "examples/event_handler_graphql/src/async_resolvers.py"
171171
```
172172

173-
### Amplify GraphQL Transformer
174-
175-
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.
176-
177-
<!-- AppSync resolver decorator is a concise way to create lambda functions to handle AppSync resolvers for multiple `typeName` and `fieldName` declarations. -->
178-
179-
```typescript hl_lines="7 15 20 22" title="Example GraphQL Schema"
180-
--8<-- "examples/event_handler_graphql/src/amplify_graphql_transformer_schema.graphql"
181-
```
182-
183-
[Create two new basic Python functions](https://docs.amplify.aws/cli/function#set-up-a-function){target="_blank"} via `amplify add function`.
184-
185-
???+ note
186-
Amplify CLI generated functions use `Pipenv` as a dependency manager. Your function source code is located at **`amplify/backend/function/your-function-name`**.
187-
188-
Within your function's folder, add Powertools for AWS Lambda (Python) as a dependency with `pipenv install aws-lambda-powertools`.
189-
190-
Use the following code for `merchantInfo` and `searchMerchant` functions respectively.
191-
192-
=== "graphql_transformer_merchant_info.py"
193-
194-
```python hl_lines="4 6 23 24 29 30 36"
195-
--8<-- "examples/event_handler_graphql/src/graphql_transformer_merchant_info.py"
196-
```
197-
198-
=== "graphql_transformer_search_merchant.py"
199-
200-
```python hl_lines="4 6 21 22 36 42"
201-
--8<-- "examples/event_handler_graphql/src/graphql_transformer_search_merchant.py"
202-
```
203-
204-
=== "graphql_transformer_list_locations.json"
205-
206-
```json hl_lines="2-7"
207-
--8<-- "examples/event_handler_graphql/src/graphql_transformer_list_locations.json"
208-
```
209-
210-
=== "graphql_transformer_common_field.json"
211-
212-
```json hl_lines="2 3"
213-
--8<-- "examples/event_handler_graphql/src/graphql_transformer_common_field.json"
214-
```
215-
216-
=== "graphql_transformer_find_merchant.json"
217-
218-
```json hl_lines="2-6"
219-
--8<-- "examples/event_handler_graphql/src/graphql_transformer_find_merchant.json"
220-
```
221-
222173
### Custom data models
223174

224175
You can subclass [AppSyncResolverEvent](../../utilities/data_classes.md#appsync-resolver){target="_blank"} to bring your own set of methods to handle incoming events, by using `data_model` param in the `resolve` method.

examples/event_handler_graphql/src/amplify_graphql_transformer_schema.graphql

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/event_handler_graphql/src/graphql_transformer_common_field.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/event_handler_graphql/src/graphql_transformer_find_merchant.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/event_handler_graphql/src/graphql_transformer_list_locations.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

examples/event_handler_graphql/src/graphql_transformer_merchant_info.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

examples/event_handler_graphql/src/graphql_transformer_search_merchant.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)