We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for graphql trait objects has been added, but it should also work as a member of a Union
The following fails with the error: the trait bound Box<dyn ProductTrait>: async_graphql::ObjectType is not satisfied
trait bound Box<dyn ProductTrait>: async_graphql::ObjectType is not satisfied
pub trait ProductTrait: Send + Sync { fn id(&self) -> &str; } #[Object] impl dyn ProductTrait { #[graphql(name = "id")] async fn gql_id(&self, _ctx: &Context<'_>) -> &str { self.id() } } #[derive(Union)] pub enum Content { Product(Box<dyn ProductTrait>), }
The text was updated successfully, but these errors were encountered:
Thanks for the sponsorship, I'll fixed this tomorrow. 🙂
Sorry, something went wrong.
Add Union and Interface support for trait objects. #780
Union
Interface
334307b
Clippy clean
Fixed in 3.0.21
3.0.21
No branches or pull requests
Support for graphql trait objects has been added, but it should also work as a member of a Union
The following fails with the error: the
trait bound Box<dyn ProductTrait>: async_graphql::ObjectType is not satisfied
The text was updated successfully, but these errors were encountered: