- Updated
uuid
to1.x
- Updated
graphq_client
to0.12
- Updated
snafu
to0.7
- Updated
async-tungstenite
to0.20
- Added
HybridConnection
that allows you to combine two connections into one, using one as the subscriptions connection, and the other as the query & mutations connection. This allows you to have a single client that, for example, supports subscriptions and the new glimesh api at the same time (as the websocket based api query currently only supports the old glimesh api) - Auth is now
Clone
Auth::refreshable_access_token
now returnsimpl Stream<Item = AccessToken>
instead of a tokio watch receiver.
- Added http_client method to the http connection builder to allow reuse of http clients.
- Added auth method to the http connection builder.
- Added clone_with_auth method to http connection to allow reusing shared data whilst specifying a different auth method.
- Added ability to unsubscribe from subscriptions.
- Subscriptions will now be automatically unsubscribed from in the background when dropped.
- Default api url for the http connection changed to the new api url
https://glimesh.tv/api/graph
. You can still use the old api url by using the http connection builder and calling.api_url("https://glimesh.tv/api")
on it. Note that some queries may be different on the new url, so you should redownload the schema and check your queries still work. - Removed
.build(auth)
in favour of.auth(auth).finish()
forglimesh::http::ConnectionBuilder
as auth is now optional (although in practise the api will fail without some form of auth). - Removed error type from
Client
as it was redundant information. - Crate now uses rust edition 2021
- The
SubscriptionConn
trait (and by extension the subscribe method on the client) now returns aglimesh::Subscription
instead of a BoxStream, although it still implements Stream with the same Item. This allows for unsubscribing viaSubscription::unsubscribe
or when dropped. The lifetime onSubscriptionConn
has also been removed as a result.
- Added
client_credentials_with_scopes
method toAuth
to allow specifying scopes for the token.
- New crate
glimesh_protocol
- Used to store lower level structures for interacting with the glimesh api.
- These are abstracted away from specific transport and are designed to be able to be consumed without using the main glimesh crate or it's choice of transport
- The glimesh_date submodule has been moved to the new glimesh_protocol package as
glimesh_protocol::date
- Updated
graphql_client
to 0.10
- Stop retrying subscriptions if the socket dies whilst doing so (#2)
- Retry resubscriptions as long as the socket is connected #1
- Added method
into_connection
to turn a client back into it's underlying connection
- Include
AuthError
type even when http feature is disabled
- Implement
Clone
+Debug
for Client where the connection does also - Expose
glimesh_date
module
SubscriptionConn
no longer binds the returned stream to the lifetime of self.Client
updated to reflect the above change
- Type aliases for websocket & http clients.
- Export
AccessToken
struct
- Require async-trait v0.1.43 or above as versions below don't work with the subscription trait due to lifetime issues.
- Subscription support on the websocket connection
- Subscription trait was changed to returning a boxed stream instead of taking a channel sender.
subscribe_with_opts
was removed as its no longer needed
- Websocket based connection
- The
Error
type has been split up into more specific error types dependent on the connection used. - Client is now generic over the error type of query/mutate/subscribe
- Auth related methods now use
AuthError
- Http connection method now use
HttpConnectionError
- Client credentials authentication
- Access token refreshing
AccessTokenWithRefresh
auth variant was renamed toRefreshableAccessToken
and can now only be constructed with theAuth::refreshable_access_token
method.- Added new error and auth variants
- Initial implementation with an HTTP based connnection.