Is it expected that if an empty string is provided...
# spicedb
b
Is it expected that if an empty string is provided for a
optional_relation.relation
in a resource filter that it filters out all relations? e.g. using postman with
ReadRelationships
Copy code
{
  "relationship_filter": {
    "resource_type": "auth/organisation",
    "optional_resource_id": "57073d44-8a5a-4294-9a29-54dde8721fe6",
    "optional_subject_filter": {
      "subject_type": "auth/staff",
      "optional_subject_id": "",
      "optional_relation": {
        "relation": ""
      }
    }
  }
}
Returns no relations, but if I remove
optional_relation
completely they are returned It's not super intuitive because providing an empty string for
optional_subject_id
does not behave the same, instead it is ignored Just trying to figure out if this is a SpiceDB bug or the .NET client needs a fix to not set
optional_relation
when it's given an empty string edit: relevant info, the relation is on
staff#user
, presumably it will return only direct relations with the empty filter? Which may explain this behaviour.
6 Views