We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51424a commit be6eabcCopy full SHA for be6eabc
packages/schema/src/plugins/zod/transformer.ts
@@ -352,8 +352,9 @@ export default class Transformer {
352
if (mappedInputTypeName.includes('NestedInput')) {
353
candidates.push(...candidates.map((name) => name.replace('NestedInput', 'Input')));
354
}
355
- const foundInputType = this.inputObjectTypes.find((it) => candidates.includes(it.name));
356
- const finalMappedName = foundInputType ? foundInputType.name : mappedInputTypeName;
+
+ const finalMappedName =
357
+ candidates.find((name) => this.inputObjectTypes.some((it) => it.name === name)) ?? mappedInputTypeName;
358
359
processedInputType = { ...inputType, type: finalMappedName };
360
0 commit comments