44 lines
594 B
GraphQL
44 lines
594 B
GraphQL
query listCategories @auth(level: USER) {
|
|
categories {
|
|
id
|
|
categoryId
|
|
label
|
|
icon
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query getCategoryById($id: UUID!) @auth(level: USER) {
|
|
category(id: $id) {
|
|
id
|
|
categoryId
|
|
label
|
|
icon
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query filterCategories(
|
|
$categoryId: String
|
|
$label: String
|
|
) @auth(level: USER) {
|
|
categories(
|
|
where: {
|
|
categoryId: { eq: $categoryId }
|
|
label: { eq: $label }
|
|
}
|
|
) {
|
|
id
|
|
categoryId
|
|
label
|
|
icon
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|