GraphQL type definition for article similar with another article

I want to make an app with GRANDstack.

In my Neo4j database I have articles that are similar to other articles.

It looks like this: (:ARTICLE)-[:SIMILAR]->(:ARTICLE)

I know that I have to firstly define GraphQL types, so I did this in my schema.graphql file:

type ARTICLE {
   _id: Long!
   id: Int!
   community: Int
   label: String!
   seed_label: Int
   title: String!
   keywords: [KEYWORD] @relation(name: "APPEARS_IN", direction: IN)

Knowing that this is article similar with other articles, how do I add the relationship SIMILAR ?

Similar too would be the same:

type ARTICLE {
... previous fields,
similar: ARTICLE @relation (name: "SIMILAR", direction: "IN")

Or however you want to direct it.

1 Like

Thank you @MuddyBootsCode