fix approve resume
This commit is contained in:
@@ -107,6 +107,49 @@ export class AppConfigSchema extends PothosSchema {
|
||||
})
|
||||
},
|
||||
}),
|
||||
updateAppConfig: t.prismaField({
|
||||
type: this.appConfig(),
|
||||
description: 'Update an app config',
|
||||
args: {
|
||||
input: t.arg({
|
||||
type: this.builder.generator.getUpdateInput('Config'),
|
||||
required: true,
|
||||
}),
|
||||
where: t.arg({
|
||||
type: this.builder.generator.getWhereUnique('Config'),
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
resolve: async (query, _root, args) => {
|
||||
return await this.prisma.config.update({
|
||||
...query,
|
||||
data: args.input,
|
||||
where: args.where ?? undefined,
|
||||
})
|
||||
},
|
||||
}),
|
||||
/* The `updateAppConfigs` field in the `AppConfigSchema` class is defining a mutation to update
|
||||
multiple app configs in the database. Here is a breakdown of what it is doing: */
|
||||
// updateAppConfigs: t.prismaField({
|
||||
// type: [this.appConfig()],
|
||||
// description: 'Update multiple app configs',
|
||||
// args: {
|
||||
// data: t.arg({
|
||||
// type: [this.builder.generator.getUpdateInput('Config')],
|
||||
// required: true,
|
||||
// }),
|
||||
// where: t.arg({
|
||||
// type: this.builder.generator.getWhere('Config'),
|
||||
// required: true,
|
||||
// }),
|
||||
// },
|
||||
// resolve: async (query, _root, args) => {
|
||||
// return await this.prisma.config.updateMany({
|
||||
// data: args.data,
|
||||
// where: args.where ?? undefined,
|
||||
// })
|
||||
// },
|
||||
// }),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user