Is there a wildcard matching symbol for query of r...
# talk-keto
p
Is there a wildcard matching symbol for query of relation tuples? For example:
Copy code
{
  "namespace": "User",
  "object": "828aad92-439b-47d2-9bc6-3213fd8fe6a4",
  "relation": "memberships",
  "subject_set": {
    "namespace": "Group",
    "object": "bffd9223-d5ea-4cdf-9de4-273e60069ebb",
    "relation": ""
  }
}
how can I request all tuples which have:
Copy code
namespace=User
subject_set.namespace=Group
while ignoring all other parameters?
b
Did you find a solution for this? I am looking similar things. Like, I want to list all members belonging to a certain group. I can currently list all groups that a member belongs to, but not another way around is as simple as I thought it would be
p
Hey, not really. Only way is to write a loop that will walk the permission tree.
b
I actually solved this
Copy code
$rs = Ory::relationship()->getRelationships(
            null, // pagetoken
            100, // pagesize
            'Group', // relationship aka namaepace
            null, // object (null because we want all groups)
            'members', // relation
            null,
            'User',
            $userId,  // all groups where userid is this
            'members',
        );
So this lists all groups that user is member of.
p
That’s only direct memeberships
what about inherited ones