async-graphql / async_graphql_apollo_studio_extension

Async GraphQL Apollo Extensions
MIT License
33 stars 8 forks source link

async-graphql 4.x.x compat issues #106

Closed birwin93 closed 9 months ago

birwin93 commented 2 years ago

Looks like this package no longer works with 4.x.x versions of async-graphql. Is this package deprecated?

Get the following

error[E0277]: the trait bound `ApolloTracing: ExtensionFactory` is not satisfied
   --> datastore/src/main.rs:78:20
    |
78  |           .extension(ApolloTracing::new(
    |  __________---------_^
    | |          |
    | |          required by a bound introduced by this call
79  | |             "token".into(),
80  | |             "https://yourdomain.ltd".into(),
81  | |             "graph@current".into(),
82  | |             "v1.0.0".into(),
83  | |             10,
84  | |         ))
    | |_________^ the trait `ExtensionFactory` is not implemented for `ApolloTracing`
    |
note: required by a bound in `async_graphql::SchemaBuilder::<Query, Mutation, Subscription>::extension`
   --> /Users/billy/.cargo/registry/src/github.com-1ecc6299db9ec823/async-graphql-4.0.2/src/schema.rs:134:48
    |
134 |     pub fn extension(mut self, extension: impl ExtensionFactory) -> Self {
    |                                                ^^^^^^^^^^^^^^^^ required by this bound in `async_graphql::SchemaBuilder::<Query, Mutation, Subscription>::extension`

For more information about this error, try `rustc --explain E0277`.
warning: `datastore` (bin "datastore") generated 2 warnings
error: could not compile `datastore` due to previous error; 2 warnings emitted
mattoni commented 2 years ago

+1 on this - I use this crate for metrics on our API and need to upgrade to 4.0.0 for other reasons. Can this crate be updated?

Miaxos commented 2 years ago

Should be good with the 3.0

birwin93 commented 2 years ago

I'd prefer to not downgrade a full major version. Is this something that will be done soon, or do you need some help with it @Miaxos ?

Miaxos commented 2 years ago

The extension version 3.0 available https://crates.io/crates/async-graphql-extension-apollo-tracing/3.0.1 will work with async-graphql 4