Closed
Description
I'm having trouble implementing the cursor connections based pagination specification. https://relay.dev/graphql/connections.htm
My Node implementation is like this:
/// A node in a pagination query.
#[graphql_interface(for = [Company], scalar = juniper::DefaultScalarValue)]
pub trait Node {
fn id(&self) -> String;
}
And company is like this:
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Company {
pub uuid: Uuid,
pub name: String,
#[serde(default)]
pub users: Vec<ClientUserNoCompany>,
}
#[graphql_object(impl = [NodeValue], description = "A generic company")]
impl Company {
pub fn id(&self) -> String { self.uuid.to_string() }
}
But I'm getting errors like this
#[graphql_object(impl = [NodeValue], description = "A generic company")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GraphQLInterface<__S>` is not implemented for `NodeValueEnum<Company>`
Why is this happening? Note: I'm using the master branch