obmarg / graphql-ws-client

A GraphQL over Websockets implementation for Rust
Apache License 2.0
39 stars 15 forks source link

refactor: new ClientBuilder #113

Open carlocorradini opened 5 months ago

carlocorradini commented 5 months ago

Fix #112

let (client, actor) = Client::builder().build(connection).await.unwrap();

Client::build and builder::ClientBuilder are deperecated. I've added #[deprecated(since = "0.11.0", note = "use Client::builder() instead")] (update since if necessary) Moreover, connection is needed only when calling subscribe or build having the advantage that the overall implementation is much simpler since there is no need for:

carlocorradini commented 5 months ago

Add #[allow(deprecated)] in builder.rs or?