Merge juniper_graphql_transport_ws
and juniper_graphql_ws
crates (#1022)
#1196
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.
Part of #1022
Resolves #1186
Follows #1158, #1191
Motivation
Despite the raised concern for the initial implementation #1158 (comment):
Integration of both protocols into a single crate showed, that fully separate crates (and therefore, types) introduce integration problems, which are resolved by reusing same types in both crates.
Following this, as we aim to support both protocols in our HTTP integration crates, both
juniper_graphql_transport_ws
andjuniper_graphql_ws
crates are always used and depend on each other, which makes a little sense to support them a separate crates.Solution
Instead, it's enough to keep only one
juniper_graphql_ws
crate, where support both protocols via additive Cargo features. This will simplify maintenance and usage costs, while allowing to reuse similar types naturally, giving the desired level of polymorphism for supporting both protocols at the same time.Checklist