-
-
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
Add support for batching #1798
Add support for batching #1798
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1798 +/- ##
=======================================
Coverage 98.15% 98.15%
=======================================
Files 139 139
Lines 5252 5262 +10
Branches 955 960 +5
=======================================
+ Hits 5155 5165 +10
Misses 52 52
Partials 45 45 |
This looks good. Looking forward to seeing this get merged. |
hi @justuswilhelm! that's good to know, do you need this for django or other frameworks? 😊 |
Thanks for your fast response. Yes, I am using strawberry in django together with apollo in the frontend |
@patrick91 I'd love to get this merged. Is there anything I can help with? |
@camflan I'll try to work on this in the next few weeks, I'm a bit busy and don't have a lot of free time :D Good to know there's people that need this 😊 |
Understood! We've started an initiative to get off graphene and this will be one of our blockers for rolling out to clients. If there's anything I can do to help please let me know |
@camflan thanks for offering! Please don't hesitate to ping me in discord if I forget :) What integration are you using? :) |
@camflan I'll think about how we can enable this feature using schema extensions, if I don't find a good solution I'll keep working on the solution from this PR |
We'd be mostly using a django integration |
@camflan I'm working on refactoring the HTTP view layer before adding this. Shouldn't take too long 😊 |
Famous last words 🙈 😅 thanks for the update! |
@camflan that's been merged! I'll work on batching soon :) Do you have any requirements? I need to think about security requirements for this, for now I think I'll add the following options:
but I wonder if we should put more :) |
Yay! 🥳
I think both of those would cover what we need for now. Batching limit, rate limiting, etc could even be tackled later as a middleware instead of the core implementation, right? |
depends on what you mean by middlewares, Strawberry extensions at the moment only work on a single operation. But you'll be able to extend the GraphQL view/router to do additional validation. I think there's going to be a method called |
closed in favour of #2698 |
This PR adds support for batching. I want to make sure all the views get this :)
TODO:
Closes #1383