Skip to content

Add an intrinsic to mask the "required link foo is hidden by access policy" errors #8522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
elprans opened this issue Mar 28, 2025 · 0 comments

Comments

@elprans
Copy link
Member

elprans commented Mar 28, 2025

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) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants