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

@@ -19,6 +19,7 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
@PothosRef()
workshopSubscription() {
return this.builder.prismaObject('WorkshopSubscription', {
description: 'A workshop subscription in the system.',
fields: (t) => ({
userId: t.exposeID('userId'),
workshopId: t.exposeID('workshopId'),
@@ -34,6 +35,8 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
workshopSubscription: t.prismaField({
type: this.workshopSubscription(),
args: this.builder.generator.findUniqueArgs('WorkshopSubscription'),
description:
'Retrieve a single workshop subscription by its unique identifier.',
resolve: async (query, root, args, ctx, info) => {
return await this.prisma.workshopSubscription.findUnique({
...query,
@@ -44,6 +47,8 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
workshopSubscriptions: t.prismaField({
type: [this.workshopSubscription()],
args: this.builder.generator.findManyArgs('WorkshopSubscription'),
description:
'Retrieve a list of workshop subscriptions with optional filtering, ordering, and pagination.',
resolve: async (query, root, args, ctx, info) => {
return await this.prisma.workshopSubscription.findMany({
...query,