As part of the migration away from blazegraph the deepcat keyword should stop relying on blazegraph custom extensions.
In T425472 @AWesterinen-WMF is exploring ways to to rewrite queries relying on this feature.
The current approach is:
SELECT ?out (MIN(?d) AS ?depth) WHERE { BIND (<$input_category> AS ?in) { BIND (<$input_category> AS ?out) . BIND(0 AS ?d) } UNION { ?out mediawiki:isInCategory ?in . BIND(1 AS ?d) } UNION { ?out mediawiki:isInCategory/mediawiki:isInCategory ?in . BIND(2 AS ?d) } UNION { ?out mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory ?in . BIND(3 AS ?d) } UNION { ?out mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory ?in . BIND(4 AS ?d) } UNION { ?out mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory/mediawiki:isInCategory ?in . BIND(5 AS ?d) } } GROUP BY ?out ORDER BY ?depth LIMIT $limit
The limitation is that we must have a limit on the depth.
AC:
- rewrite and test the deepcat sparql query to use standard SPARQL
- deepcat should use standard SPARQL to fetch the category graph