evitaDB
evitaDB copied to clipboard
Allow specification of `inScope` in extra results
Currently the inScope constraint is not supported in extraResults of GraphQL / REST API even if the basic evitaQL allows it. This means we're not able to specify query for entities in multiple scopes and calculating a hierarchy tree for only LIVE scope. The engine would complain that it cannot generate hierarchy result from two scopes - which is true, but there is no way how to instruct it, that we want only the LIVE scope to be used for hierarchy tree calculations.
Example query:
{
queryProduct(
filterBy: {
hierarchyCategoriesWithin: {
ofParent: {
attributeCodeEquals: "audio"
}
},
scope: [LIVE, ARCHIVED]
}
) {
extraResults {
inScope(scope: LIVE) {
hierarchy {
categories {
megaMenu: fromRoot(
stopAt: {
level: 2
}
) {
level
entity {
primaryKey
attributes {
code
}
}
requested
queriedEntityCount
childrenCount
}
}
}
}
}
}
}