I am using MongoDB, graphql-yoga and Prisma. I am unable to query nested fields which are null

prisma

#1

I have datamodel which is as follows:

type Category {
 id: ID! @id
 name: String!
 description: String
 parentId: Category @relation(link: INLINE)
}

I have Categories and Sub-Categories, Sub-Categories level are not defined so I am creating categories and sub-categories from same model. Fields which does not have parentId is main Category. I want to query in Categories to find which all data has parentId as null, so that I can rendet this to UI as main category.