Skip to content

Commit

Permalink
Fix ref relay options in plugin-prisma
Browse files Browse the repository at this point in the history
  • Loading branch information
maruware committed Oct 21, 2024
1 parent bc3115d commit d77deb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-prisma/src/schema-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ 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) =>
(
t as unknown as {
globalID: (options: Record<string, unknown>) => FieldRef<SchemaTypes, unknown>;
}
).globalID({
...(this.options as { relayOptions?: { idFieldOptions?: object } }).relayOptions
...(this.options as { relay?: { idFieldOptions?: object } }).relay
?.idFieldOptions,
...idOptions,
nullable: false,
Expand Down

0 comments on commit d77deb5

Please sign in to comment.