# 00-maestro.md section 12, example 3, guard output (graphApi TenantCypherGuard, tenants=['acme', '__public__'])
query: "CYPHER 25 MATCH (mi:ModelInstance WHERE mi.tenant_id IN $__scope_tenants)-[:HAS_ENTITY]->(e WHERE (e.tenant_id IN $__scope_tenants OR (e.tenant_id IS NULL AND e:`CatalogModel`|`EntityLabel`|`ModelField`|`Theme`))) WHERE CASE WHEN (e IS NULL OR (e.tenant_id IN $__scope_tenants OR (e.tenant_id IS NULL AND e:`CatalogModel`|`EntityLabel`|`ModelField`|`Theme`))) THEN (toLower(e.value) = $__scope_s0) ELSE false END RETURN mi.uid"
---
Match optional=False
  Path var=None selector=None
    Node var=mi labels=(ModelInstance) props={} where=(IN (Prop (Var mi) tenant_id) (Param __scope_tenants))
    Rel var=__r0 types=(HAS_ENTITY) dir=out props={} where=None
    Node var=e labels=* props={} where=(OR (IN (Prop (Var e) tenant_id) (Param __scope_tenants)) (AND (IS NULL (Prop (Var e) tenant_id)) (LabelTest (Var e) (CatalogModel|EntityLabel|ModelField|Theme))))
  where=(Case (WHEN (OR (IS NULL (Var e)) (OR (IN (Prop (Var e) tenant_id) (Param __scope_tenants)) (AND (IS NULL (Prop (Var e) tenant_id)) (LabelTest (Var e) (CatalogModel|EntityLabel|ModelField|Theme))))) (= (Func tolower (Prop (Var e) value)) (Param __scope_s0))) else=(Lit false))
Return distinct=False order=() skip=None limit=None
  mi.uid = (Prop (Var mi) uid)
