How to include multiple templates in GraphQL?
When I give something like below doesn't work.
children(includeTemplateIDs: "{614C6C64-AD35-440E-9668-DF39D8A18CCG},{B094FD0E-D349-46C0-B829-GBB37E8AB379}")
I have tried the below format it works fine for me and most importantly it should be at the same level.
children(includeTemplateIDs: ["{614C6C64-AD35-440E-9668-DF39D8A18CCG}","{B094FD0E-D349-46C0-B829-GBB37E8AB379}"])
If you want inner child, you should add children query at the next level.
Getting multiple data source items data.
query ContentCardQuery($datasource: String!) {
datasource: item(path: $datasource, language: "en") {
name
newsItems: children(
includeTemplateIDs: ["{B5D116DE-BFE8-4A06-A3FE-90C84320ECCB}"]
) {
name
... on RelatedItems {
title {
value
}
subtitle {
value
}
}
}
blogItems: children(
includeTemplateIDs: ["{02CDBE64-254B-424B-90C3-E74FDBA02572}"]
) {
name
... on SubRelatedItems {
title {
value
}
subtitle {
value
}
}
}
}
}