Adds the Relation type to the protobuf definitions so we can re-use it throughout our code. This will make things more tidy and elegant on the backend where we store a map[string]*openfgapb.TypeDefinition. Instead, we can now store map[string]*openfgapb.Relation and use that in places, which will reduce the duplication of indexing into two maps all over the place and will allow us to pass around a Relation object where appropriate.
[X] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[X] The correct base branch is being used, if not main
[X] I have added tests to validate that the change in functionality is working as expected
Description
Adds the
Relation
type to the protobuf definitions so we can re-use it throughout our code. This will make things more tidy and elegant on the backend where we store amap[string]*openfgapb.TypeDefinition
. Instead, we can now storemap[string]*openfgapb.Relation
and use that in places, which will reduce the duplication of indexing into two maps all over the place and will allow us to pass around a Relation object where appropriate.References
Review Checklist
main