to map an individual request to the pairs in a Bul...
# spicedb
g
Hi, regarding the experiemental API and BulkCheckPermission action. The API returns a Pair of Request and Response. However, from the client perspective, what is the best way to deal with the response? The clients will have the list of permissions they want to check and they receive back the same Requests and the Responses. What is the most optimal way to access them? I mean, there still needs to be an iteration over the result to find the response (bool) for the provided request. But to identify the request they need to do some processing like: give me the response for the request with this resource type and id, this relation and this subject type and id, right? Wouldn't it be better to have something like a UUID in the
BulkCheckPermissionPair
so that we can easily access a request directly? Or maybe I'm missing something. Thanks!
v
right now bulk response is guaranteed to be in the same order as the request, so you can access it by the index, see https://github.com/authzed/spicedb/issues/1563 If the index is irrelevant to you, then you need to compare your request with the one returned in the pair, as you noted.
g
This is great news, then. Thanks!