Skip to content
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

add an aws chalice integration #923

Merged
merged 43 commits into from Nov 24, 2021

Conversation

mcsheehan
Copy link

This adds an aws chalice integration with unit tests.
A server can be launched from the tests directory by making a chalice config and then running chalice local. The unit tests capture the usage of chalice.

Closes #845

@botberry
Copy link
Member

botberry commented May 9, 2021

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release adds support for AWS Chalice. A framework for deploying serverless applications using AWS.

A view for aws chalice has been added to the strawberry codebase.
This view embedded in a chalice app allows anyone to get a GraphQL API working and hosted on AWS in minutes using a serverless architecture.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Mark Sheehan for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

strawberry/chalice/graphiql.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
strawberry/chalice/views.py Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
strawberry/chalice/views.py Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
docs/integrations/chalice.md Outdated Show resolved Hide resolved
Updated release notes and added chalice as a dev dependency
Added catching the json_body value error and removed unused type error
TypeError must be caught here as they payload might not be json
Removed the separate get and post methods
Added the chalice integration to the docs
Update docs/integrations/chalice.md
Added the suggestion to remove $ from the shell commands to be consistent

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Update docs/integrations/chalice.md

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Update strawberry/chalice/views.py

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Update docs/integrations/chalice.md

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Update docs/integrations/chalice.md

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Update docs/integrations/chalice.md

Co-authored-by: ignormies <bryce.beagle@gmail.com>
Added a response type to the documentation
@BryceBeagle
Copy link
Member

This may require a few changes if #1066 is merged first

@mcsheehan
Copy link
Author

This may require a few changes if #1066 is merged first

Subscriptions aren't currently supported, (just queries and mutations, the same as the flask plugin) so I think this should be fine regardless of #1066.

mcsheehan and others added 7 commits November 23, 2021 18:26
As a result of the unit tests have handled the BadRequestError returned by chalice and mapped that to a graphql style error response with status code 200.
Removed the untested line from views and added a default argument instead
RELEASE.md Outdated Show resolved Hide resolved
@patrick91
Copy link
Member

I'll merge this after I fix the mypy issue :D

@patrick91 patrick91 force-pushed the feature/chalice branch 2 times, most recently from 3ce08d1 to 492ba72 Compare November 23, 2021 23:39
Apparently mypy has some issues when using classes inside functions,
as we do in our tests, issue here:
python/mypy#6422
@patrick91 patrick91 merged commit 1ad28d5 into strawberry-graphql:main Nov 24, 2021
@botberry
Copy link
Member

Thanks for contributing to Strawberry! 🎉 You've been invited to join
the Strawberry GraphQL organisation 😊

You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67

And don't forget to join our discord server: https://strawberry.rocks/discord 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for aws chalice
5 participants