-
Notifications
You must be signed in to change notification settings - Fork 421
Docs: create Example for usage of AppSync for Mutations #1953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks a lot for creating the issue after our discussion on Discord: https://discord.com/channels/1006478942305263677/1006527338621710376/1078461122056814643 Taking your example as the base, I'll create a quick test to be extra sure it works as expected, then send a PR for the docs to get your review (and credit accordingly). @app.resolver(type_name="Mutation", field_name="createTodo")
@tracer.capture_method
def create_todo(
id: str = "", # noqa AA03 VNE003 shadows built-in id to match query argument, e.g., createTodo(id: "some_id")
) -> Todo:
logger.info(f"Create Todo {id}")
todos: Response = requests.put(f"https://jsonplaceholder.typicode.com/todos/{id}") // NOT SURE what to DO!
todos.raise_for_status()
return todos.json() |
hey @tb102122 just created a draft PR improving the example, and the wording around Please let me know your thoughts. I thought it'd be too much to add a mutation json sample given the real estate we're dealing with - let me know otherwise! |
|
This is now released under 2.9.1 version! |
What were you searching in the docs?
How to us the use the Framework for Mutations.
Is this related to an existing documentation section?
https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/docs/core/event_handler/appsync.md
How can we improve?
add sample code for todo creation and update.
Got a suggestion in mind?
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: