Skip to content

Commit a4173e0

Browse files
committed
docs: rename snippets to match advanced section
1 parent bc6cd12 commit a4173e0

7 files changed

+24
-24
lines changed

Diff for: docs/core/event_handler/appsync.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -370,22 +370,22 @@ You can use `@batch_resolver` or `@async_batch_resolver` decorators to receive t
370370

371371
In this mode, you must return results in the same order of your batch items, so AppSync can associate the results back to the client.
372372

373-
=== "getting_started_with_batch_resolver.py"
373+
=== "advanced_batch_resolver.py"
374374
```python hl_lines="5 9 23"
375-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver.py"
375+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver.py"
376376
```
377377

378378
1. The entire batch is sent to the resolver. You need to iterate through it to process all records.
379379
2. We use `post_id` as our unique identifier of the GraphQL request.
380380

381-
=== "getting_started_with_batch_resolver_payload.json"
381+
=== "advanced_batch_resolver_payload.json"
382382
```json hl_lines="6 16 25 35 44 54"
383-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_payload.json"
383+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_payload.json"
384384
```
385385

386-
=== "getting_started_with_batch_query.graphql"
386+
=== "advanced_batch_query.graphql"
387387
```typescript hl_lines="3 6"
388-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_query.graphql"
388+
--8<-- "examples/event_handler_graphql/src/advanced_batch_query.graphql"
389389
```
390390

391391
##### Processing items individually
@@ -445,22 +445,22 @@ In this mode, we will:
445445
2. Gracefully handle errors by adding `None` in the final response for each batch item that failed processing
446446
* You can customize `nul` or error responses back to the client in the [AppSync resolver mapping templates](https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#returning-individual-errors){target="_blank"}
447447

448-
=== "getting_started_with_batch_resolver_individual.py"
448+
=== "advanced_batch_resolver_individual.py"
449449
```python hl_lines="5 9 19"
450-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_individual.py"
450+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_individual.py"
451451
```
452452

453453
1. You need to disable the aggregated event by using `aggregate` flag.
454454
The resolver receives and processes each record one at a time.
455455

456-
=== "getting_started_with_batch_resolver_payload.json"
456+
=== "advanced_batch_resolver_payload.json"
457457
```json hl_lines="6 16 25 35 44 54"
458-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_payload.json"
458+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_payload.json"
459459
```
460460

461-
=== "getting_started_with_batch_query.graphql"
461+
=== "advanced_batch_query.graphql"
462462
```typescript hl_lines="3 6"
463-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_query.graphql"
463+
--8<-- "examples/event_handler_graphql/src/advanced_batch_query.graphql"
464464
```
465465

466466
##### Raise on error
@@ -519,42 +519,42 @@ You can toggle `raise_on_error` parameter in `@batch_resolver` to propagate any
519519

520520
This is useful when you want to stop processing immediately in the event of an unhandled or unrecoverable exception.
521521

522-
=== "getting_started_with_batch_resolver_handling_error.py"
522+
=== "advanced_batch_resolver_handling_error.py"
523523
```python hl_lines="5 9 19"
524-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_handling_error.py"
524+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_handling_error.py"
525525
```
526526

527527
1. You can enable enable the error handling by using `raise_on_error` flag.
528528

529-
=== "getting_started_with_batch_resolver_payload.json"
529+
=== "advanced_batch_resolver_payload.json"
530530
```json hl_lines="6 16 25 35 44 54"
531-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_payload.json"
531+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_payload.json"
532532
```
533533

534-
=== "getting_started_with_batch_query.graphql"
534+
=== "advanced_batch_query.graphql"
535535
```typescript hl_lines="3 6"
536-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_query.graphql"
536+
--8<-- "examples/event_handler_graphql/src/advanced_batch_query.graphql"
537537
```
538538

539539
#### Async batch resolver
540540

541541
Similar to `@batch_resolver` explained in [batch resolvers](#batch-resolvers), you can use `async_batch_resolver` to handle async functions.
542542

543-
=== "getting_started_with_batch_async_resolver.py"
543+
=== "advanced_batch_async_resolver.py"
544544
```python hl_lines="5 9 23"
545-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_async_resolver.py"
545+
--8<-- "examples/event_handler_graphql/src/advanced_batch_async_resolver.py"
546546
```
547547

548548
1. `async_batch_resolver` takes care of running and waiting for coroutine completion.
549549

550-
=== "getting_started_with_batch_resolver_payload.json"
550+
=== "advanced_batch_resolver_payload.json"
551551
```json hl_lines="6 16 25 35 44 54"
552-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_resolver_payload.json"
552+
--8<-- "examples/event_handler_graphql/src/advanced_batch_resolver_payload.json"
553553
```
554554

555-
=== "getting_started_with_batch_query.graphql"
555+
=== "advanced_batch_query.graphql"
556556
```typescript hl_lines="3 6"
557-
--8<-- "examples/event_handler_graphql/src/getting_started_with_batch_query.graphql"
557+
--8<-- "examples/event_handler_graphql/src/advanced_batch_query.graphql"
558558
```
559559

560560
## Testing your code

0 commit comments

Comments
 (0)