update service status
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
import { Builder } from '../Graphql/graphql.builder';
|
||||
import { PrismaService } from '../Prisma/prisma.service';
|
||||
import { MinioService } from '../Minio/minio.service';
|
||||
import { ServiceStatus } from '@prisma/client';
|
||||
@Injectable()
|
||||
export class ServiceSchema extends PothosSchema {
|
||||
constructor(
|
||||
@@ -55,6 +56,11 @@ export class ServiceSchema extends PothosSchema {
|
||||
imageFileUrl: t.exposeString('imageFileUrl', {
|
||||
description: 'The URL of the image file for the service.',
|
||||
}),
|
||||
status: t.expose('status', {
|
||||
type: ServiceStatus,
|
||||
nullable: true,
|
||||
description: 'The status of the service.',
|
||||
}),
|
||||
createdAt: t.expose('createdAt', {
|
||||
type: 'DateTime',
|
||||
nullable: true,
|
||||
@@ -125,6 +131,7 @@ export class ServiceSchema extends PothosSchema {
|
||||
description:
|
||||
'Retrieve a list of services with optional filtering, ordering, and pagination.',
|
||||
type: [this.service()],
|
||||
|
||||
args: this.builder.generator.findManyArgs('Service'),
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
return await this.prisma.service.findMany({
|
||||
|
||||
Reference in New Issue
Block a user