-
Notifications
You must be signed in to change notification settings - Fork 421
docs(appsync): add mutation example and infrastructure fix #1964
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
docs(appsync): add mutation example and infrastructure fix #1964
Conversation
@heitorlessa I think you like to remove "or Title under Todo" in the type explanation section or? I assume something like this:
|
Great catch! I’ll fix these, generate an event just to be safe, and merge
it.
Thanks a lot again Tobias for helping us out
…On Tue, 28 Feb 2023 at 21:46, Tobias Bruckert ***@***.***> wrote:
@heitorlessa <https://github.com/heitorlessa> I think you like to remove
"or Title under Todo" in the type explanation section or?
For completion we should also extend the event examples.
[image: image]
<https://user-images.githubusercontent.com/62531735/221975130-d7c586d6-5dfa-4bf5-8ca4-7ed19c3966bd.png>
I assume something like this:
{
"arguments": {
"title": "Titel of DEMO ToDo"
},
"identity": null,
"source": null,
"request": {
"headers": {
"x-forwarded-for": "1.2.3.4, 5.6.7.8",
"accept-encoding": "gzip, deflate, br",
"cloudfront-viewer-country": "NL",
"cloudfront-is-tablet-viewer": "false",
"referer": "https://eu-west-1.console.aws.amazon.com/appsync/home?region=eu-west-1",
"via": "2.0 9fce949f3749407c8e6a75087e168b47.cloudfront.net (CloudFront)",
"cloudfront-forwarded-proto": "https",
"origin": "https://eu-west-1.console.aws.amazon.com",
"x-api-key": "da1-c33ullkbkze3jg5hf5ddgcs4fq",
"content-type": "application/json",
"x-amzn-trace-id": "Root=1-606eb2f2-1babc433453a332c43fb4494",
"x-amz-cf-id": "SJw16ZOPuMZMINx5Xcxa9pB84oMPSGCzNOfrbJLvd80sPa0waCXzYQ==",
"content-length": "114",
"x-amz-user-agent": "AWS-Console-AppSync/",
"x-forwarded-proto": "https",
"host": "ldcvmkdnd5az3lm3gnf5ixvcyy.appsync-api.eu-west-1.amazonaws.com",
"accept-language": "en-US,en;q=0.5",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0",
"cloudfront-is-desktop-viewer": "true",
"cloudfront-is-mobile-viewer": "false",
"accept": "*/*",
"x-forwarded-port": "443",
"cloudfront-is-smarttv-viewer": "false"
}
},
"prev": null,
"info": {
"parentTypeName": "Mutation",
"selectionSetList": [
"title",
"id"
],
"selectionSetGraphQL": "{\n title\n id\n}",
"fieldName": "createTodo",
"variables": {}
},
"stash": {}
}
—
Reply to this email directly, view it on GitHub
<#1964 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBC3AXMILZRB7D74ZSTWZZPZPANCNFSM6AAAAAAVK7W5PY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Now it's ready @tb102122 - Added a sample Also fixed unrelated issues as I was reproducing it with our sample infrastructure. |
I'll assume the 🎉 reaction as approval ;) Since @leandrodamascena and @rubenfonseca are unavailable this week, I'm merging and rebuilding the latest doc to prevent any confusion until our next release. Thanks a lot @tb102122 once again. |
Issue number: #1953
Summary
Changes
This PR extends the getting started example by adding a mutation. Previously, we only had queries, making it harder to work with mutations for newcomers of Event Handler AppSync.
createTodo
mutation in the schemaschema { mutation: Mutation }
)getting_started_graphql_api_resolver.py
)Sample events
)It also improves the example infrastructure to ease reproducing it in the future:
Definition
withDefinitionS3Location
withinTodosApiSchema
AppSync API resource. This removes schema duplication and prevent error-prone updates by centralizing in a single source of truthDefinitionS3Location
only works with SAM CLIrequirements.txt
with dependencies used so it can be built withsam build --use-container
samconfig.toml
to ease deploying next time (sam deploy
, orsam deploy -g
in other accounts). On the fence about this one as someone else deploying will change the file; will keep it for now as it doesn't harmUser experience
Schema extended
New Sample events tab
Sample resolver extended
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.