-
Notifications
You must be signed in to change notification settings - Fork 420
feat(event_handlers) Add support for returning dict, status-code tuples from resolvers #1853
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
Conversation
Support returning dict responses and status codes from api gateway route functions Signed-off-by: Matthew Coyle <[email protected]>
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theoutsider24 thank you for opening this PR!
Two asks:
- can you please try to fix the tests? I believe we need some type updates to the tests
- would you mind adding an update to the docs with the new use case?
We would love if you could help us with this, but otherwise we would be happy to assist :)
@rubenfonseca Thanks for the comments! I've fixed that issue with the type-hinting |
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Thank you so much for this PR @theoutsider24! Ruben updated the documentation and we merged it! |
That's awesome! Thanks so much for your help guys, really pleased I was able to contribute and I look forward to using the feature myself 💪 |
This is now released under 2.7.0 version! |
Issue number:
#1845
Summary
Changes
The response handling in api gateway has been extended to handle dict, status-code tuples
User experience
Endpoints with non-200 status code no longer need to manually build Response objects, they can simply return a dict and status code
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
NoRFC 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.