Skip to content

Implementation of automatic batching for async #554

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

Merged

Conversation

leszekhanusz
Copy link
Collaborator

@leszekhanusz leszekhanusz commented May 26, 2025

See #430

Now that execute_batch is supported on async transports, we implement the automatic batching of requests which is activated by setting the batching_interval parameter of the Client.

If multiple requests are executed in different asyncio tasks in the interval, they will be automatically batched in a single request.

  • Adding docs
  • now supporting using a str instead of a document to simplify making the GraphQLRequest object.

Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7fb869a) to head (d02bed3).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #554    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           38        40     +2     
  Lines         2908      3084   +176     
==========================================
+ Hits          2908      3084   +176     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leszekhanusz leszekhanusz merged commit 7fcb5b6 into graphql-python:master May 27, 2025
15 checks passed
@leszekhanusz leszekhanusz deleted the feature_auto_batching_async branch May 27, 2025 16:57
@leszekhanusz leszekhanusz mentioned this pull request May 27, 2025
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.

1 participant