async-graphql
async-graphql copied to clipboard
How to use recursive generic InputObject
Currently the following code does not compile:
#[derive(InputObject)]
#[graphql(concrete(name = "StringNode", params(String)))]
pub struct Node<T: InputType> {
value: T,
children: Vec<Node<T>>,
}
The error I am seeing is:
the trait bound `Node<T>: InputType` is not satisfied
required because of the requirements on the impl of `InputType` for `Vec<Node<T>>`