Skip to content
Discussion options

You must be logged in to vote

Unfortunately, this isn't really possible, outside of using Materialize (https://authzed.com/docs/authzed/concepts/authzed-materialize).

The only way to determine the total count is to fully calculate the results, which the callers can already do. This, of course, has performance implications as you mentioned and also requires the caller to either cache the full set of results themselves (and keep them updated) or have possibly-stale counts displayed.

This is, in fact, what Materialize does: it precomputes the results set(s) for the watched permission(s), so it has the data available more or less in real-time, and thus can answer these questions.

Our recommendation is to not display the (…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by josephschorr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants