You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct GenericType<T> { items: Vec<T> }
graphql_object!(<T> GenericType<T>: () as "GenericType" |&self| {
field count() -> i32 { self.items.len() as i32 }
});
bit can't use it like
graphql_object!(<T> Listt<T>: () as "Listt" |&self| {
......
field edges() -> Vec<T> {
self.edges
}
});
what gives an ^ the trait juniper::GraphQLType is not implemented for T error.
So it make little sense for me, if I can't use the generic as another GraphQLType in object macro.
This is cool example from docs
bit can't use it like
what gives an ^ the trait
juniper::GraphQLType
is not implemented forT
error.So it make little sense for me, if I can't use the generic as another GraphQLType in object macro.
Macro doesn't support this and neither this:
To make this happen I had to drop Macro and generate a lot of boilerplate code. So it would be nice to see this kind of support in future.
The text was updated successfully, but these errors were encountered: