openfga / api

Protocol Buffers used by OpenFGA
Apache License 2.0
18 stars 10 forks source link

chore: add Relation type to protobuf definitions for reusability #33

Closed jon-whit closed 2 years ago

jon-whit commented 2 years ago

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 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.

References

Review Checklist