44 lines
796 B
GraphQL
44 lines
796 B
GraphQL
type Category implements Base {
|
|
id: ID!
|
|
title: [Translated!]!
|
|
|
|
body: [Translated!]
|
|
|
|
"#bson:ignore"
|
|
parent: Category @goField(forceResolver: true)
|
|
parentId: ID
|
|
|
|
"#bson:ignore"
|
|
children: [Category] @goField(forceResolver: true)
|
|
|
|
createdAt: Time!
|
|
updatedAt: Time!
|
|
|
|
"#bson:ignore"
|
|
createdBy: User! @goField(forceResolver: true)
|
|
createdById: ID!
|
|
|
|
"#bson:ignore"
|
|
updatedBy: User! @goField(forceResolver: true)
|
|
updatedById: ID!
|
|
|
|
"#bson:ignore"
|
|
owner: User @goField(forceResolver: true)
|
|
ownerId: ID!
|
|
}
|
|
|
|
input CreateCategoryInput {
|
|
title: [TranslatedInput!]!
|
|
body: [TranslatedInput]
|
|
parentId: ID
|
|
}
|
|
|
|
extend type Mutation {
|
|
createCategory(input: CreateCategoryInput!): Category!
|
|
}
|
|
|
|
extend type Query {
|
|
categories: [Category]!
|
|
category(id: ID!): Category!
|
|
}
|