fix time geneate logic and replace default datetime by luxon
This commit is contained in:
@@ -81,7 +81,7 @@ export class OrderSchema extends PothosSchema {
|
||||
description:
|
||||
'Retrieve a list of orders with optional filtering, ordering, and pagination.',
|
||||
args: this.builder.generator.findManyArgs('Order'),
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
resolve: async (query, _root, args, _ctx, _info) => {
|
||||
return await this.prisma.order.findMany({
|
||||
...query,
|
||||
take: args.take ?? undefined,
|
||||
@@ -95,7 +95,7 @@ export class OrderSchema extends PothosSchema {
|
||||
type: this.order(),
|
||||
args: this.builder.generator.findUniqueArgs('Order'),
|
||||
description: 'Retrieve a single order by its unique identifier.',
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
resolve: async (query, _root, args, _ctx, _info) => {
|
||||
return await this.prisma.order.findUnique({
|
||||
...query,
|
||||
where: args.where,
|
||||
@@ -124,7 +124,7 @@ export class OrderSchema extends PothosSchema {
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
resolve: async (query, _root, args, _ctx, _info) => {
|
||||
return this.prisma.$transaction(async (prisma) => {
|
||||
const order = await prisma.order.create({
|
||||
...query,
|
||||
@@ -162,7 +162,7 @@ export class OrderSchema extends PothosSchema {
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
resolve: async (query, _root, args, _ctx, _info) => {
|
||||
return await this.prisma.order.delete({
|
||||
...query,
|
||||
where: args.where,
|
||||
@@ -185,7 +185,7 @@ export class OrderSchema extends PothosSchema {
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
resolve: async (query, _root, args, _ctx, _info) => {
|
||||
return await this.prisma.order.update({
|
||||
...query,
|
||||
data: args.data,
|
||||
|
||||
Reference in New Issue
Block a user