You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently wrap references to required links with assert_exists if the target is covered by an access policy. This is done to avoid breaking the cardinality invariant in case the access policy masks all target objects. However, in certain contexts, such as autogenerated queries (of which the UI is a heavy user) this necessitates potentially expensive workarounds (such as avoiding the link reference by computing the referenced object via a backlink combined with an explicit join).
We need an explicit escape hatch to remove the need for the workarounds. I suggest something like try() or optional(), e.g select Foo { req_made_optional := optional(.required_link_possibly_masked_by_ap) }
The text was updated successfully, but these errors were encountered:
We currently wrap references to required links with
assert_exists
if the target is covered by an access policy. This is done to avoid breaking the cardinality invariant in case the access policy masks all target objects. However, in certain contexts, such as autogenerated queries (of which the UI is a heavy user) this necessitates potentially expensive workarounds (such as avoiding the link reference by computing the referenced object via a backlink combined with an explicit join).We need an explicit escape hatch to remove the need for the workarounds. I suggest something like
try()
oroptional()
, e.gselect Foo { req_made_optional := optional(.required_link_possibly_masked_by_ap) }
The text was updated successfully, but these errors were encountered: