-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
(fix) fastapi: context_getter signature to allow Awaitable #3763
base: main
Are you sure you want to change the base?
(fix) fastapi: context_getter signature to allow Awaitable #3763
Conversation
Reviewer's Guide by SourceryThe pull request modifies the signature of the Sequence diagram showing context getter usage in FastAPI routersequenceDiagram
participant Client
participant Router as GraphQLRouter
participant ContextGetter
Client->>Router: GraphQL Request
Router->>ContextGetter: Get Context
alt Synchronous Context
ContextGetter-->>Router: Return Context directly
else Asynchronous Context
ContextGetter-->>Router: Return Awaitable[Context]
Router-->>Router: Await Context
end
Router-->>Client: GraphQL Response
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @alexey-pelykh - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding tests to verify both synchronous and asynchronous context getters work as expected.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
39e0aad
to
d2eaad7
Compare
3f17516
to
6889e9a
Compare
Description
The
context_getter
is further passed tostrawberry/strawberry/fastapi/router.py
Lines 69 to 71 in 7ba5928
strawberry/strawberry/fastapi/router.py
Line 128 in 7ba5928
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Bug Fixes: