—GraphQL dynamic zone Union query does not filter or sort data. I have a collection called Section and within that I have a dynamic zone called SectionGroups. Within that I added a component called FieldGroup. This component has a relation with a collection called Field. The attribute name is FieldList. If I add a sort or filter on FieldList it does not work. See the query below in bold what does not work => fieldLists( where : { key : “cycle_start_date”} )
Write your query or mutation here
query {
sections {
id
name
templateName
order
version
display
displayText
sectionGroups {
... on ComponentPanelComponentsSimpleCard {
key
title
displayText
}
... on ComponentDatasetComponentsDataTable{
cols
body
}
... on ComponentDatasetComponentsFieldGroup {
key
className
label
**fieldLists( where : { key : "cycle_start_date"} )**
{
id
key
order
display
}
}
}
GraphQL dynamic zone Union query does not filter or sort data. I have a collection called Section and within that I have a dynamic zone called SectionGroups. Within that I added a component called FieldGroup. This component has a relation with a collection called Field. The attribute name is FieldList. If I add a sort or filter on FieldList it does not work. See the query below what does not work => fieldLists( where : { key : “cycle_start_date”} )
query {
sections {
id
name
templateName
order
version
display
displayText
sectionGroups {
... on ComponentPanelComponentsSimpleCard {
key
title
displayText
}
... on ComponentDatasetComponentsDataTable{
cols
body
}
... on ComponentDatasetComponentsFieldGroup {
key
className
label
fieldLists( where : { key : "cycle_start_date"} )
{
id
key
order
display
}
}
}
Not currently, the backend DZ and components use polymorphic relations and we don’t currently support filtering on polymorphic relations. It’s not an easy thing to implement at the database level so it will take us some time and won’t likely happen until after our database refresh going on between this quarter and Q1 2021.