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
The docs describe how to use the read() method with a TupleKey with no relation set to get a list of all relations a user has with an object. Currently the TupleKey object validation prevents the relation from being None.
Expectation
Not to throw an error when omitting relation or setting to None.
# from openfga_sdk import OpenFgaClient, ReadRequestTupleKey# Initialize the fga_client# fga_client = OpenFgaClient(configuration)# Find all relationship tuples where a certain user has a relationship as any relation to a certain documentbody=ReadRequestTupleKey(
user="user:81684243-9356-4421-8fbf-a4f8d36aa31b",
object="document:roadmap",
)
response=awaitfga_client.read(body)
# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})
Checklist
Description
The docs describe how to use the
read()
method with aTupleKey
with norelation
set to get a list of all relations a user has with an object. Currently theTupleKey
object validation prevents therelation
from beingNone
.Expectation
Not to throw an error when omitting
relation
or setting toNone
.Reproduction
Essentially the code from the docs:
Working around the validation and submitting the query confirms the behavior describes from the docs (i.e., listing the relations) works as expected:
Issuing a query with a workaround:
OpenFGA SDK version
0.4.0 (but the code in main appears broken)
OpenFGA version
v1.5.0
SDK Configuration
[default options]
Logs
No response
References
No response
The text was updated successfully, but these errors were encountered: