refactor schema to match database schema
This commit is contained in:
@@ -67,10 +67,10 @@ export class CenterSchema extends PothosSchema {
|
||||
chatRoom: t.relation('chatRoom', {
|
||||
description: 'The chat room associated with the center.',
|
||||
}),
|
||||
centerStaff: t.relation('CenterStaff', {
|
||||
centerStaff: t.relation('centerStaff', {
|
||||
description: 'The staff members of the center.',
|
||||
}),
|
||||
resume: t.relation('Resume', {
|
||||
resume: t.relation('resume', {
|
||||
description: 'The resume of the center.',
|
||||
}),
|
||||
centerStatus: t.expose('centerStatus', {
|
||||
@@ -123,7 +123,7 @@ export class CenterSchema extends PothosSchema {
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
return await this.prisma.center.findFirst({
|
||||
where: {
|
||||
CenterStaff: {
|
||||
centerStaff: {
|
||||
some: {
|
||||
staffId: args.userId,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user