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
@@ -699,11 +699,23 @@ export function createDataDef<TSource, TContext, TArgs>(
699
699
// Found existing data definition and fetch it
700
700
constexistingDataDef=data.defs[index]
701
701
702
-
collapseLinksIntoDataDefinition({
703
-
additionalLinks: saneLinks,
704
-
existingDataDef,
705
-
data
706
-
})
702
+
if(existingDataDef.targetGraphQLType===TargetGraphQLType.oneOfUnion&&Array.isArray(existingDataDef.subDefinitions)// Special handling for oneOf. Sub definitions are always an array (see createOneOfUnion)
703
+
){
704
+
existingDataDef.subDefinitions.forEach((def)=>{
705
+
collapseLinksIntoDataDefinition({
706
+
additionalLinks: saneLinks,
707
+
existingDataDef: def,
708
+
data,
709
+
})
710
+
}
711
+
)
712
+
}else{
713
+
collapseLinksIntoDataDefinition({
714
+
additionalLinks: saneLinks,
715
+
existingDataDef,
716
+
data,
717
+
})
718
+
}
707
719
708
720
returnexistingDataDef
709
721
}
@@ -734,7 +746,7 @@ export function createDataDef<TSource, TContext, TArgs>(
734
746
* Recursively resolve allOf so type, properties, anyOf, oneOf, and
0 commit comments