Skip to content

Conversation

jpopesculian
Copy link

Examples wouldn't compile because of

  • Not having the required features
  • futures version being outdated

In addition, I added an example for tokio-tungstenite and renamed some examples for clarity and typos

@obmarg
Copy link
Owner

obmarg commented Jun 19, 2025

What compile errors were you seeing without these changes?

I build & test the examples on CI so it's a little worrying if that's not working...

@jpopesculian
Copy link
Author

Locally on main, if I run

cargo run --example tokio

the trait bound `StreamingOperation<BooksChangedSubscription>: GraphqlOperation` is not satisfied
  --> examples/examples/tokio.rs:60:39

cargo run --example cynic-mulitiple-subscriptions

error[E0277]: the trait bound `StreamingOperation<BooksChangedSubscription>: GraphqlOperation` is not satisfied
  --> examples/examples/cynic-mulitiple-subscriptions.rs:63:51

cargo run --example graphql-client-single-subscription

error[E0432]: unresolved import `graphql_ws_client::graphql::StreamingOperation`
  --> examples/examples/graphql-client-single-subscription.rs:8:5

cargo run --example cynic-single-subscription

error[E0277]: the trait bound `StreamingOperation<BooksChangedSubscription>: GraphqlOperation` is not satisfied
   --> examples/examples/cynic-single-subscription.rs:56:20

Adding features client-cynic and client-graphql-client fixes those errors. I was also encountering an issue with the futures crate for some reason sticking to futures 0.3.28 when I added tokio-tungstenite so I pinned it to at least 0.3.31 (the other versions are yanked)

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.

2 participants