You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[resolvers] Add avoidCheckingAbstractTypesRecursively option to support nested defaultMappers (#10141)
* Add avoidCheckingAbstractTypesRecursively to control whether to recursively checks and generates abstract nested types
* Add changeset
* Add avoidCheckingAbstractTypesRecursively to defaultMapper
Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively
7
+
8
+
For users that already sets recursive default mappers e.g. `Partial<{T}>` or `DeepPartial<{T}>`, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting `avoidCheckingAbstractTypesRecursively: true` allows users to continue to use recursive default mappers as before.
* @description If true, recursively goes through all object type's fields, checks if they have abstract types and generates expected types correctly.
653
+
* This may not work for cases where provided default mapper types are also nested e.g. `defaultMapper: DeepPartial<{T}>` or `defaultMapper: Partial<{T}>`.
654
+
*/
655
+
avoidCheckingAbstractTypesRecursively?: boolean;
647
656
/**
648
657
* @ignore
649
658
*/
@@ -726,6 +735,7 @@ export class BaseResolversVisitor<
0 commit comments