diff --git a/packages/schema/src/plugins/enhancer/enhance/index.ts b/packages/schema/src/plugins/enhancer/enhance/index.ts index 6bcacacb4..ff2e00b6a 100644 --- a/packages/schema/src/plugins/enhancer/enhance/index.ts +++ b/packages/schema/src/plugins/enhancer/enhance/index.ts @@ -466,7 +466,9 @@ export function enhance(prisma: any, context?: EnhancementContext<${authTypePara if (delegateInfo.some(([delegate]) => `${delegate.name}Delegate` === iface.getName())) { // delegate models cannot be created directly, remove create/createMany/upsert - structure.methods = structure.methods?.filter((m) => !['create', 'createMany', 'upsert'].includes(m.name)); + structure.methods = structure.methods?.filter( + (m) => !['create', 'createMany', 'createManyAndReturn', 'upsert'].includes(m.name) + ); } return structure; diff --git a/packages/server/src/api/rest/index.ts b/packages/server/src/api/rest/index.ts index c2385b95e..36442f4f8 100644 --- a/packages/server/src/api/rest/index.ts +++ b/packages/server/src/api/rest/index.ts @@ -518,7 +518,6 @@ class RequestHandler extends APIHandlerBase { }; // include IDs of relation fields so that they can be serialized - // this.includeRelationshipIds(type, args, 'select'); args.select = { ...args.select, [relationship]: { select: this.makeIdSelect(relationInfo.idFields) } }; let paginator: Paginator | undefined;