-
Notifications
You must be signed in to change notification settings - Fork 70
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
Swift Concurrency Support #100
Swift Concurrency Support #100
Conversation
Hey, J! This all looks great. Thank you for finally looking into async/await support. I'm really out of time these days. If you have some time, it would be nice if you took a look at the work I have in GraphQLSwift/Graphiti#71. Besides async/await, it also adds support for client and server directives, which I think it's pretty neat. To implement it, I had to do some work here, which is in the same branch name |
Basically you define a directive like this: Then you add it to the schema like this: Then you apply to a field, for example, like this: |
If you have no interest in looking into that, that's cool too. 😄 |
By the way, feel free to merge the PR and tag a new release. 😊 |
Oh woah, adding directives like that looks awesome!! I'll have a look over the next week or two for sure! |
No need to be sorry at all, @d-exclaimation. This work was my first foray into Swift async/await, so I'm glad to have someone watching my back 😄. I'll jump on and review for sure. |
This adds support for Swift concurrency by adding new top-level async public APIs.
It also adds a Swift concurrency-based
EventStream
. This allows us to directly test the subscription functionality within this package, and allows clients to use GraphQL subscriptions without coding custom EventStreams (which typically required drivers like GraphQLRxSwift)Long term, we probably want to remove the
EventStream
workaround and just use the swift concurrency types by default. This has been left as a future task though, because it would require a breaking API change and require all clients to be using swift versions that support concurrency.