GraphQL API
create_item(name)
Create a new item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the item. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
The created item. |
Source code in templates/graphql/handler.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
get_item(id)
Retrieve an item by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the item. |
required |
Returns:
| Type | Description |
|---|---|
dict | None
|
The item if found, or None. |
Source code in templates/graphql/handler.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
list_items()
Retrieve all items.
Returns:
| Type | Description |
|---|---|
list[dict]
|
A list of items. |
Source code in templates/graphql/handler.py
38 39 40 41 42 43 44 45 46 47 48 49 | |
main(event, context)
Lambda entry point for the AppSync resolver.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
dict
|
The AppSync resolver event. |
required |
context
|
LambdaContext
|
The Lambda execution context. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
The resolved data. |
Source code in templates/graphql/handler.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |