add context subscription
This commit is contained in:
@@ -243,6 +243,9 @@ export class ServiceSchema extends PothosSchema {
|
||||
}),
|
||||
},
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
if (ctx.isSubscription) {
|
||||
throw new Error('Not allowed');
|
||||
}
|
||||
return await this.prisma.$transaction(async (prisma) => {
|
||||
// check if service is already approved or rejected
|
||||
const service = await prisma.service.findUnique({
|
||||
@@ -265,7 +268,7 @@ export class ServiceSchema extends PothosSchema {
|
||||
adminNote: {
|
||||
create: {
|
||||
content: args.adminNote ?? '',
|
||||
notedByUserId: ctx.me.id,
|
||||
notedByUserId: ctx.http.me.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user