-
Notifications
You must be signed in to change notification settings - Fork 25
Utilize batchCheck within listRelations #336
Description
Please do not report security vulnerabilities here. See the Responsible Disclosure Program.
Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible.
By submitting an issue to this repository, you agree to the terms within the OpenFGA Code of Conduct.
Describe the problem you'd like to have solved
listRelations uses clientBatchCheck to evaluate the relations passed in. With the addition of batchCheck, this is not the most efficient way to query the OpenFGA server.
Describe the ideal solution
Follow the pattern established with clientBatchCheck and batchCheck
- Rename the existing
listRelationstoclientListRelations - Add new
listRelationsmethod that usesbatchCheck
Alternatives and current workarounds
Alternative:
- add a boolean flag to
listRelationsforuseServerBatchCheckdefaulted tofalse. Nonbreaking change, but does not follow precedent and boolean parameters for functions is generally an anti-pattern.
Workaround: Do not use listRelations and instead call batchCheck directly from code, then map the results to return the same format.
Additional context
Add any other context or screenshots about the feature request here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status