Skip to content

Commit b2bbf20

Browse files
committed
doc: remove appendContext and related router examples for clarity
1 parent aef50b9 commit b2bbf20

File tree

4 files changed

+0
-61
lines changed

4 files changed

+0
-61
lines changed

docs/features/event-handler/appsync-graphql.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -144,34 +144,6 @@ Let's assume you have `app.ts` as your Lambda function entrypoint and routes in
144144
--8<-- "examples/snippets/event-handler/appsync-graphql/splitRouter.ts"
145145
```
146146

147-
#### Sharing contextual data
148-
149-
You can use `appendContext` when you want to share data between your App and Router instances. Any data you share will be available via the `sharedContext` parameter in your resolver handlers.
150-
151-
???+ warning
152-
For safety, we clear the context after each invocation.
153-
154-
???+ tip
155-
This can also be useful for injecting contextual information before a request is processed.
156-
157-
=== "app.ts"
158-
159-
```typescript hl_lines="10"
160-
--8<-- "examples/snippets/event-handler/appsync-graphql/appendContext.ts"
161-
```
162-
163-
=== "postRouter.ts"
164-
165-
```typescript hl_lines="5-8"
166-
--8<-- "examples/snippets/event-handler/appsync-graphql/postRouterWithContext.ts"
167-
```
168-
169-
=== "userRouter.ts"
170-
171-
```typescript hl_lines="5-8"
172-
--8<-- "examples/snippets/event-handler/appsync-graphql/userRouterWithContext.ts"
173-
```
174-
175147
### Nested mappings
176148

177149
!!! note

examples/snippets/event-handler/appsync-graphql/appendContext.ts

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

examples/snippets/event-handler/appsync-graphql/postRouterWithContext.ts

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

examples/snippets/event-handler/appsync-graphql/userRouterWithContext.ts

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

0 commit comments

Comments
 (0)