sites 9.5 – GraphQL: how to query items base on itemType AND itemId
I would like to retrieve through GraphQL all the published URLs of a page, for all publicationIds.
Is there any way to retrieve items based on itemType (e.g., PAGE) and itemId (e.g., pageId=”196″)? (we are trying to avoid making one call per publicationId to get the page URLs)
Example:
{
items(
filter:{
namespaceIds:[1],
itemTypes:[PAGE],
publicationIds:[7,8,9], // all publications
itemIds:[196] // something like this would be ideal
}
)
{
edges
{
node {
itemId
publicationId
title
... on Page{
url
}
}
}
}
}
Read more here: Source link