-
Notifications
You must be signed in to change notification settings - Fork 434
Add subscription support #433
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
LegNeato
merged 343 commits into
graphql-rust:master
from
instrumentisto:async-await-subscriptions
Mar 19, 2020
Merged
Changes from 3 commits
Commits
Show all changes
343 commits
Select commit
Hold shift + click to select a range
ab90737
Push errors to executor in `resolve_selection_set_into_iter`
nWacky 2f04ea4
Change 'Arc' to 'Rc' in synchronous context
nWacky 58f8cba
Push errors to executor in `resolve_selection_set_into_stream`
nWacky cf3b8e2
Comment out all tests, create new test module for subscriptions
nWacky 6b6f7c4
Fix subscription macro
nWacky 4408dcc
Add synchronous test for subscriptions, fix errors in macros, minor r…
nWacky 0434559
Add async subscriptions test
nWacky 40533d8
Add more sync subscription tests, encapsulate sync and async tests to…
nWacky c0202fb
Encapsulate async subscription creation logic
nWacky e9b08d5
Format
nWacky b95191f
Add `into_iter` for `IteratorGraphQLResponse`
nWacky 9794489
Update playground with `into_iter`
nWacky ca3f321
Tried implementing `into_stream` with poll_next
nWacky 67e0884
Implemented `into_stream`
nWacky b72cba7
Add `into_stream` to playground, fix bug
nWacky babff0a
Format
nWacky 18d928c
Add docs, refactor
nWacky 72fcdc4
Add docs to executor_wrappers
nWacky 45194fb
Format [skip ci]
nWacky 2b51dee
Fix warnings in juniper [skip ci]
nWacky e7ad2c5
Fix compilation error without "async" feature [skip ci]
nWacky fd6c0ff
Rebase onto `async-await`
nWacky e577b60
Tests pass [skip ci]
nWacky 430487b
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky a08b379
Fix rocket playground compilation error [skip ci]
nWacky 3572178
Rebase onto `async_await`
nWacky 5145a8a
Fix error with not displayed results in GraphQL Playground
nWacky c867b57
Stop returning values after stop signal received
nWacky 109e5a8
Stop stream after stop signal received
nWacky 3bc69ec
Close stream after close message
nWacky 7b720f3
Format, minor refactor
nWacky 7d81472
Resolve variables
nWacky 36110b6
Add instructions how to use variables with subscriptions (playground …
nWacky 7b10956
Format imports, fix warnings, use id from request
nWacky 5a79836
Fix "__Type" not found error in queries
nWacky 068771a
Fix "_EmptySubscription" introspection query errors
nWacky 0bbb537
Update graphql playground version
nWacky 2ada844
Remove all `println`s from `juniper_warp`
nWacky 0234924
Fix warnings, check if `warp_async` compiles without `async` feature …
nWacky 4c0748d
Fix project's cargo.toml [skip ci]
nWacky 7706ebc
Update comment in `warp_subscriptions` [skip ci]
nWacky 7a262ed
Rebase onto `async-await`
nWacky 54d4bec
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky 4debdfb
Rebase onto `master`
nWacky 6bed20f
Format
nWacky ea474ab
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky 90873ac
Tests pass [skip ci]
nWacky 153a870
Rebase onto `async-await`
nWacky b1a395c
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky 599747f
Fix warnings and remove unnecessary .len() function for value::Object
tyranron acd1bf2
Refactor value::Object methods
tyranron 5b1173d
Refactor validation module changes
tyranron 1f1837b
Some corrections [skip ci]
tyranron 2036ba5
Rebase juniper onto master
nWacky f3ee2c6
Fix warp compilation errors
nWacky a9d5e93
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky 3a86158
Revert merge
nWacky 365c5ec
Start resolving todo with macro
nWacky 43f3478
Fix tests compilation errors
nWacky 6b48eff
Rebase onto `async-await`
nWacky e6257b3
Merge branch 'async-await-upstream' into async-await-subscriptions
nWacky f95e15e
Resolve warnings, add 'as _' to StreamExt, TryStreamExt, FuturesExt
nWacky 6a1a27d
Juniper's tests pass
nWacky 8df420e
Add return types as iterators support for `graphql::subscription` macro
nWacky be1534e
Format
nWacky 60cc4ff
Format playground
nWacky fe5bfa4
Reset `juniper_rocket` to async version, fix warnings
nWacky 000e83a
Refactor docs in base.rs
nWacky 39403e4
Add GraphQLTypeAsync manual implementation example
nWacky a927100
Fix tests
nWacky 9af5d59
Make playground url optional, fix bug in #[juniper::subscription]
nWacky 66e5388
Format, update docs in `async_await`
nWacky 5627d3e
Add test for `test_extract_ok_type_from_std_result`, remove needless …
nWacky b05cfee
Format [skip ci]
nWacky 76c3efa
Remove IteratorGraphQLResponse::into_iter\StreamGraphQLResponse::into…
nWacky bd430dd
Resolve error `warp::reject::Reject` not implemented, add #![deny(war…
nWacky 932267f
Add `EmptySubscription` to `juniper_warp` tests
nWacky ffdfa6e
Rename `fields_count` to `field_count`
nWacky 6a75ca5
User `take_while` in `Object::try_from_iter`
nWacky ce96a9b
Update docs on subscription macros
nWacky 77d6862
Add FieldResult to `extract_result_segment`
nWacky c05748b
Use .for_each instead of .then.for_each [skip ci]
nWacky 8e892a6
Remove needless structs from playground [skip ci]
nWacky 2fcb523
Merge branch 'async-await-subscriptions-origin' into async-await-subs…
nWacky 4ae9e44
Remove GraphQLSubscriptionType
nWacky f9d0ec6
Refactor subscription functions
nWacky 65f10c2
Add default implementation for `StreamGraphQLResponse` back
nWacky 3372df1
Remove `ValuesIterator`
nWacky 92d0b89
Pass fragments vector by value in `Executor`
nWacky 3d250df
Rename `GraphQLSubscriptionTypeAsync` to `GraphQLSubscriptionType`, r…
nWacky 9577bf9
Tried owned executor [does not compile]
nWacky 1c7a356
Add manual GraphQLType implementantion to playground [does not compile]
nWacky c34a312
Rename `ValuesStream` to `ValuesResultStream`, replace returned value…
nWacky 661ae5e
Rename GraphQLSubscriptionType to GraphQLSubscriptionTypeAsync
nWacky 0fc7532
Start adding better error logic
nWacky 0f71b13
Rewrite resolve_selection_set_into_stream_recursive to return Result<…
nWacky 283e3b4
Return errors, add errors to StreamGraphQLResponse [only juniper comp…
nWacky 4152006
Return errors and close connection from juniper_warp
nWacky 047e092
Try using `SubscriptionsExecutor` instead of `Executor` [does not com…
nWacky 1fb4ada
Keep only necessary things in SubscriptionsExecutor
nWacky e2dfb54
Revert to 4152006d0d5037e2ce3e6992bef95e692313af71
nWacky 74d303f
Return ExecutionError and return errors over graphql more correctly
nWacky eb153e9
Start updating macros [does not compile]
nWacky c90abaa
Resolve only the first item in selection set, panic otherwise. Use Su…
nWacky f189b89
Use executor in resolver
nWacky 553f694
Format
nWacky 73b3810
Return Null when got error while resolving subscription
nWacky 954f325
resolve fragments on subscriptions
nWacky 56f0d78
Fix bug when resolving fragment spread
nWacky d17548b
Fix warnings, format
nWacky d0c9b34
Macros compile
nWacky 6e89673
Move subscriptions logic to separate module
nWacky 3a2cdfe
Add SubscriptionCoordinator and SubscriptionConnection traits, Subscr…
nWacky f275a2c
Start implementing subscription connection for subscriptions example
nWacky f80cbbc
Try using Executor instead of SubscriptionsExecutor [only juniper com…
nWacky 9851277
Use `Executor` instead of `SubscriptionsExecutor` in most places and …
nWacky ceab242
Uncomment resolver logic, fix lifetimes
nWacky ee6936f
Use Arc for FieldPath
nWacky 0398ec1
Format
nWacky beadd15
Fix bug with endless loop on empty object
nWacky de2303b
Fix lifetime mismatch compilation error with fragment spread
nWacky cb5dc85
Encapsulate FieldError and ExecutionError to StreamError, add derive(…
nWacky b9d9322
Use Executor's errors vector, update http handlers
nWacky 236452f
Add trait to convert T to Ok(t)
nWacky 6ef4e69
Support both `T` and `Result<T, E>` as field resolvers
nWacky f32bb3b
Implement GraphQLTraitAsync for T, Result<T>, and T in stream, Result…
nWacky dc383c9
Encapsualte subscription-related traits to juniper
nWacky e7c2059
Fix bug with type alias
nWacky 35944d4
Update macros
nWacky 3ef45e8
Return errors from `into_stream` directly
nWacky f609577
Remove needless cloning
nWacky f5b99c9
Format
nWacky ccf0ad2
Pass Executor instead of OwnedExecutor to resolve_field_into_stream
nWacky c2ead6d
Update macros
nWacky 03c5ed8
Refactor ExecutorDataVariables
nWacky 5b17288
Allow multiple subscriptions to be executed
nWacky 8474a6c
Format, add some docs and todos
nWacky d41e7d8
Fix warnings
nWacky d8c3692
Remove SubscriptionCoordinator and SubscriptionConnection
nWacky e04e2f8
Minor refactor
nWacky 5d0e2b8
Export juniper_codegen::async to #[cfg(feature = "async")]
nWacky 6475747
Mark local todos to todo#433, change all todos to TODO
nWacky 815e442
Resolve local TODOs
nWacky 6f70d1c
Update args.rs todos as in master
nWacky c0f8d80
Update tests
nWacky 86bee52
Update tests
nWacky 576e876
Rename executor_wrappers to owned_executor, update juniper_codegen todo
nWacky 2ca2026
Format
nWacky bf0c85d
Lint juniper, clean up playground
nWacky e40c36e
Remove needless test
nWacky 117860a
Update playgrounds
nWacky 079f6dd
Rebase onto async-await
nWacky f30c422
Merge branch 'async-await-subscriptions' into async-await-subscriptio…
nWacky eda2d2b
Fix merge
nWacky 533796b
Start fixing tests
nWacky ac21584
tests pass
nWacky 9df3a44
Format imports
nWacky 8f2d805
Fix compilation error on `run`
nWacky 975cd9f
Format [skip ci]
nWacky 481b3b5
Exclude subscriptions example from the project tree [skip ci]
nWacky d8379ac
Rebase onto master
nWacky a53ab44
Fix juniper compilation errors
nWacky 0815d10
Resolve todos
nWacky 17231bf
Review subscription execution logic
nWacky f7d23a9
Review subscription execution logic
nWacky 37ede87
Minor refactor
nWacky cdbafdf
Fix warp and warp example compilation errors
nWacky faea73d
Format
nWacky ce56ce2
Fix warnings
nWacky 9e09df3
Rename #[subscription] to #[graphqL_subscription]
nWacky 44549b6
Fix tests compilation errors
nWacky 6f1a5be
Fix test warnings
nWacky beaf1c8
Resolve todos, uncomment other tests
nWacky ad22bab
Resolve todos, uncomment and fix other tests
nWacky e4decf0
Format [skip ci]
nWacky 81166b3
Merge branch 'async-await-subscriptions' of https://github.com/instru…
nWacky 284e9b2
Fix merge [skip ci]
nWacky 02d7176
Merge remote-tracking branch 'origin/master' into async-await-subscri…
nWacky 05e1c8a
Fix compilation errors
nWacky 58824dc
Format
nWacky a9bd13d
Sketch SubscriptionCoordinator::subscribe
nWacky 263a3af
Create `Coordinator: SubscriptionCoordinator`
nWacky bb19863
Implement SubscriptionCoordinator::subscribe()
nWacky 5725d4c
Implement Connection
nWacky a5231a1
Implement demo server, temporatily not return Box<SubscriptionConnect…
nWacky cbe08fa
Move subscriptions impl to juniper_subscriptions module, tried implem…
nWacky 5f1325a
Delete old Connection implementation
nWacky 02617f9
Implement From<Value::Object<Stream>> for Connection
nWacky abd8c89
Return Self::Connection from SubscriptionConnection::subscribe
nWacky 584214d
Remove async trait from Subscription
nWacky 12fef56
Format
nWacky 5be6ce1
Resolve warnings and some todos
nWacky 3102a92
Implement other members in `Connection::from_stream`
nWacky 7b6d2b6
Implement Value::Null and Value::Scalar in `Connection::from_stream`
nWacky 3161ed5
Refactor Connection::from_stream, implement value::list
nWacky 75e27ed
Add some docs
nWacky d09e0ba
Implement fastest_response_stream
nWacky ce37269
Add docs for juniper_subscriptions
nWacky 7a7e1de
Minor refactor: function names
nWacky 8addc5e
Rebane ValuesResultStream to ValuesStream
nWacky 3c88a45
Resolve todos
nWacky a28a8fc
Fix compilation errors without async feature
nWacky bd6595e
Clean up
nWacky c8ae02c
Format
nWacky f6b4561
Not panic on errors in juniper_warp
nWacky 71b16fe
Fix error resolving "_schema" query
nWacky 510282b
Add a todo: not panic on nonexisting fields inside GraphQL objects
nWacky 4361a00
Move warp_subscriptions implementation to example
nWacky 6d3feb7
Fix tests errors
nWacky 54fe613
Tried writing tests with subscriptioncooddinator
nWacky ce7505c
Subscriptions tests pass
nWacky c7d7d2f
Remove needless todos [skip ci]
nWacky 60594e3
Merge remote-tracking branch 'origin/async-await-subscriptions' into …
nWacky f29e621
Fix merge
nWacky 5f69876
Merge remote-tracking branch 'upstream/master' into async-await-subsc…
nWacky f0a1a31
Fix merge
nWacky e53c062
Format
nWacky 500cb10
Clean up, add todos [skip ci]
nWacky d027221
Fix tests failure
nWacky 4bc481f
Add juniper_subscriptions tests
nWacky bcd5978
Clean up juniper_subscriptions::whole_values_stream logic
nWacky 9737394
Format
nWacky 7785ad7
Refactor
nWacky 5bd8462
Refactor warp_subscriptions
nWacky da0138c
Subscription tests pass
nWacky b0b9486
Rebase warp_async
nWacky a7a1941
Refactor
nWacky 63287a5
Add subscription macros tests
nWacky 65e3047
Merge remote-tracking branch 'upstream/master' into async-await-subsc…
nWacky 6863e4c
Fix merge
nWacky a7b537e
Update changelog and docs, minor refactor
nWacky aa27e42
Fix CI
nWacky 21dac57
Format
nWacky a1656ee
Update changelogs
nWacky 963f5e1
Apply suggestions
nWacky f86cf8b
Apply review suggestions
nWacky f837582
Refactor warp_subscriptions
nWacky 66b5fc1
Fix tests
nWacky 994440e
Add poll_fn back
nWacky 5d0d5e8
Format
nWacky c56dbf4
Not exclude warp
nWacky b6ed979
Move graphql_subscriptions to juniper_warp
nWacky b0392ed
Update book and benches
nWacky 2962ef7
Add type to EmptySubcription
nWacky 67ba411
Fix book compile error
nWacky b62c339
Add subscriptions to release.toml
nWacky e3070e2
Merge remote-tracking branch 'upstream/master' into async-await-subsc…
nWacky c5e5fe9
Remove futures01 from juniper_warp
nWacky fcb0082
Format
nWacky 1baa24f
Fix cargo.toml
nWacky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@nWacky
async-await
is unnecessary with0.3.0-alpha.19