Skip to content

angee.graphql.sharing

Declarative GraphQL surface for direct record sharing.

RecordAccessType

python
@strawberry.type
class RecordAccessType()

One stored direct relation on a record's declared share surface.

from_direct

python
@classmethod
def from_direct(cls, access: DirectRecordAccess) -> RecordAccessType

Project one model-owned direct tuple onto the GraphQL boundary.

RecordAccessQuery

python
@strawberry.type
class RecordAccessQuery()

Direct-access listing for one declaratively shareable record.

record_access

python
@strawberry.field
def record_access(info: strawberry.Info, target_type: str,
                  target_id: PublicID) -> list[RecordAccessType]

Return direct declared-relation tuples, without effective expansion.

RecordAccessMutation

python
@strawberry.type
class RecordAccessMutation()

Authored grant and revoke actions for declared record relations.

grant_record_access

python
@strawberry.mutation
@action_guard("Grant record access failed.")
def grant_record_access(info: strawberry.Info, target_type: str,
                        target_id: PublicID, relation: str,
                        subject: PublicID) -> ActionResult

Idempotently grant a user one relation declared by the target model.

revoke_record_access

python
@strawberry.mutation
@action_guard("Revoke record access failed.")
def revoke_record_access(info: strawberry.Info, target_type: str,
                         target_id: PublicID, relation: str,
                         subject: PublicID) -> ActionResult

Idempotently revoke a user from one target-declared relation.

schemas

Direct record-sharing contributions to the console schema.

Released under the AGPL-3.0 License.