Stylianos Gakis
11/09/2023, 1:49 PMquery CrossSells {
currentMember {
id
crossSells {
id
title ... and more here
}
}
}
And this one in another module
query CrossSellIds {
currentMember {
crossSells {
id
}
}
}
This results in a duplicate error, like
duplicate Type 'ResolverKey(kind=SchemaType, id=CrossSell)' generated in modules: :feature-x,:feature-y
This is because it can not understand how to handle generating the data builder for crossSells
right?Stylianos Gakis
11/09/2023, 1:52 PMUse 'alwaysGenerateTypesMatching' in a parent module to generate the type only once
crossSells
returns [CrossSell!]!
so Adding
alwaysGenerateTypesMatching.set(listOf("CrossSell"))
fixes this.
Is this also another thing which would be solved in 4.x with isADependencyOf
and dependsOn
? Does it know how to handle this in those scenarios?mbonnin
11/09/2023, 1:59 PMisADependencyOf
mbonnin
11/09/2023, 2:00 PMmbonnin
11/09/2023, 2:00 PMmbonnin
11/09/2023, 2:01 PMalwaysGenerateTypesMatching.set(listOf("*"))
but this has been found to be slow in multiple occurencesStylianos Gakis
11/09/2023, 2:03 PM