AEM 6.5 Headless | Fragment reference data type with multiple content fragment allowed
I have a content fragment model having a single-valued field of type Fragment reference, in which 2 Content Fragment models are allowed.
I am looking into the most effective approach to write a Graphql query handling both content fragment models within a single field. Our initial attempt encompassed the inclusion of fields from both content fragment models within the said field; however, this endeavour resulted in query disruptions. Upon execution of Graphql query it throws error:
Validation error of type FieldUndefined: Field 'title' in type 'AllFragmentModels' is undefined @ 'productList/items/flag/title'"
Your insights and recommendations on this matter would be greatly valued. Please share if you have any example queries for reference.
Update:
Find below a screenshot of the field showing the concerned field.

The query used is:
query productList($productID:String,$locale:String)
{productList(filter:{
productID : {_expressions: [{value:$productID}]}},
_locale : $locale
)
{items{
flag{title,backgroundColor,flagColor,saveOffer},
}
}
}
This query work fine if I only allow a single content fragment model in the field. Issue is only with multiple content fragment allowed. Wondering if I'm missing something..
