Readrels vs LR
# spicedb
g
Hello, may I ask what is the difference between LookupResource and ReadRelationships? With both I am able to run a query like:
GET all <resource_type> with <permission> for <user:user_id>
, right? the 1st one returns a list of `LookupResources `with Resource_id and whether there's a permission, and the 2nd one returns the
relationships
if they exist. Aren't they kind of the same? Thanks!
e
ReadRelationships only returns relationships you have written to the datastore with WriteRelationships. LookupResources can return computed permissions too.
g
Ah, got it. Thanks!