From d77deb59036912cc38ef2335e16fc737d6fe6f01 Mon Sep 17 00:00:00 2001 From: maruware Date: Mon, 21 Oct 2024 21:34:07 +0900 Subject: [PATCH] Fix ref relay options in plugin-prisma --- packages/plugin-prisma/src/schema-builder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-prisma/src/schema-builder.ts b/packages/plugin-prisma/src/schema-builder.ts index b16425e5f..9a7967c47 100644 --- a/packages/plugin-prisma/src/schema-builder.ts +++ b/packages/plugin-prisma/src/schema-builder.ts @@ -179,7 +179,7 @@ schemaBuilderProto.prismaNode = function prismaNode( this.configStore.onTypeConfig(ref, (nodeConfig) => { this.objectField( ref, - (this.options as { relayOptions?: { idFieldName?: string } }).relayOptions?.idFieldName ?? + (this.options as { relay?: { idFieldName?: string } }).relay?.idFieldName ?? 'id', (t) => ( @@ -187,7 +187,7 @@ schemaBuilderProto.prismaNode = function prismaNode( globalID: (options: Record) => FieldRef; } ).globalID({ - ...(this.options as { relayOptions?: { idFieldOptions?: object } }).relayOptions + ...(this.options as { relay?: { idFieldOptions?: object } }).relay ?.idFieldOptions, ...idOptions, nullable: false,