Follow-up from #1416 and #1423.
withDescriptions now emits .describe() for Zod and Zod v4 fields. #1416 also added .describe() to the generated object schema when the GraphQL type itself has a description, for example an input object description.
That type-level part did not land in #1423. It is still useful, especially when callers pass the root schema to tools that read Zod metadata.
Scope I would keep small:
- zod and zodv4 only
- input object schemas, and object/interface schemas when
withObjectType is enabled
- both
function and const export modes
- escaping coverage for quotes, backslashes, and newlines
The field-level behavior is already done, so this should stay focused on type-level .describe() calls.
Follow-up from #1416 and #1423.
withDescriptionsnow emits.describe()for Zod and Zod v4 fields. #1416 also added.describe()to the generated object schema when the GraphQL type itself has a description, for example an input object description.That type-level part did not land in #1423. It is still useful, especially when callers pass the root schema to tools that read Zod metadata.
Scope I would keep small:
withObjectTypeis enabledfunctionandconstexport modesThe field-level behavior is already done, so this should stay focused on type-level
.describe()calls.