-
Notifications
You must be signed in to change notification settings - Fork 11
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
Concurrency #21
Concurrency #21
Conversation
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.
Thanks for contributing @ZirgVoice! Overall, these changes look good! My only big concern is that they make significant changes to the public API, which would result in a major version bump, and dropping support for the NIO EventLoop based API, which others may rely on.
How would you feel about preserving the NIO implementation, but offering this async
implementation as a separate API? For example, we could either A) create this as an AsyncDataLoader
class, B) offer a separate AsyncDataLoader
library product from this swift package, or C) create a new GraphQLSwift/AsyncDataLoader
repo. Personally, I lean toward option B, but I'd be interested in your thoughts! Thanks again!
Co-authored-by: Jay Herron <30518755+NeedleInAJayStack@users.noreply.github.com>
Thanks for the feedback! I agree, option B seems like the best approach. |
I made a separate library product AsyncDataLoader |
Thanks! Looks like there's just a few CI tasks left to do. To fix the linting, you should be able to run this on the repo and commit the changes: docker run --rm -v ./:/repo ghcr.io/nicklockwood/swiftformat:latest /repo And if we're bumping to Swift 5.10 dependence, we will need to remove the previous Swift versions from CI. Finally, it'd be good to know why |
The test testMultipleRequestsWithMaxBatchSize was failing because the operations are executed in parallel, which led to an incorrect order. The order doesn't matter for us, so I changed the check to count the elements in the arrays. |
I changed the swift-tools-version to 5.9 because swift-atomics requires version 5.9. In the workflows, I removed versions 5.7 and 5.8. |
Sorry about the delay. This looks great! Thanks! |
I pulled this into v2.3.0 |
This is a dataloader implementation using swift concurrency