enum _CategoryOrdering {
  id_asc
  id_desc
  name_asc
  name_desc
  slug_asc
  slug_desc
  icon_asc
  icon_desc
  createdAt_asc
  createdAt_desc
  updatedAt_asc
  updatedAt_desc
  postCount_asc
  postCount_desc
}

type Category {
  id: ID!
  name: String!
  slug: String
  icon: String!
  createdAt: String
  updatedAt: String
  posts: [Post]! @relation(name: "CATEGORIZED", direction: "IN")
  postCount: Int! @cypher(statement: "MATCH (this)<-[:CATEGORIZED]-(r:Post) RETURN COUNT(r)")
}

type Query {
  Category(
    id: ID
    name: String
    slug: String
    icon: String
    createdAt: String
    updatedAt: String
    first: Int
    offset: Int
    orderBy: [_CategoryOrdering]
  ): [Category]
}
