expose orderstatus instead string
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
} from '@smatch-corp/nestjs-pothos';
|
||||
import { Builder } from '../Graphql/graphql.builder';
|
||||
import { PrismaService } from '../Prisma/prisma.service';
|
||||
|
||||
import { OrderStatus } from '@prisma/client';
|
||||
@Injectable()
|
||||
export class OrderSchema extends PothosSchema {
|
||||
constructor(
|
||||
@@ -26,7 +26,10 @@ export class OrderSchema extends PothosSchema {
|
||||
paymentId: t.exposeString('paymentId'),
|
||||
userId: t.exposeID('userId'),
|
||||
serviceId: t.exposeID('serviceId'),
|
||||
status: t.exposeString('status'),
|
||||
status: t.expose('status', {
|
||||
type: OrderStatus,
|
||||
nullable: false,
|
||||
}),
|
||||
total: t.exposeInt('total'),
|
||||
createdAt: t.expose('createdAt', { type: 'DateTime' }),
|
||||
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
|
||||
|
||||
Reference in New Issue
Block a user