push code push code

This commit is contained in:
2024-10-17 15:02:25 +07:00
parent 053fb38273
commit 59923b02cb
18 changed files with 106 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ export class ServiceAndCategorySchema extends PothosSchema {
@PothosRef()
serviceAndCategory() {
return this.builder.prismaObject('ServiceAndCategory', {
description: 'A service and category in the system.',
fields: (t) => ({
serviceId: t.exposeID('serviceId'),
service: t.relation('service'),
@@ -35,6 +36,8 @@ export class ServiceAndCategorySchema extends PothosSchema {
serviceAndCategories: t.prismaField({
type: [this.serviceAndCategory()],
args: this.builder.generator.findManyArgs('ServiceAndCategory'),
description:
'Retrieve a list of service and categories with optional filtering, ordering, and pagination.',
resolve: async (query, root, args, ctx, info) => {
return await this.prisma.serviceAndCategory.findMany({
...query,