angee.tags.schema
GraphQL schema contributions for Angee tags.
Exposed on the admin console. :class:Tag gets ordinary CRUD; the polymorphic :class:TagAssignment edge is not an ordinary resource insert, so it is written through the authored tag / untag mutations and read through the authored tag_assignments query — all thin dispatchers into :class:~angee.tags.models.TagAssignmentManager, which owns the edge protocol: target and tags resolve under the calling actor (nobody tags a row they cannot read), and only the gate-less edge insert/delete elevates. The mutations are additionally gated on the tags_admin role.
TagsAdminPermission
class TagsAdminPermission(RolePermission)Allow actors who reach the tags_admin role.
Platform admins (angee/role:admin) are implicit members through the role's member union in permissions.zed.
TagType
@strawberry_django.type(Tag)
class TagType(AngeeNode)Admin projection of one tag in the vocabulary.
TagAssignmentType
@strawberry_django.type(TagAssignment)
class TagAssignmentType(AngeeNode)Admin projection of one polymorphic tag edge, with its target addressed publicly.
target_type
@strawberry_django.field(only=["content_type_id", "object_id"])
def target_type() -> strReturn the target row's REBAC resource type (e.g. parties/party).
target_id
@strawberry_django.field(only=["content_type_id", "object_id"])
def target_id() -> PublicIDReturn the target row's public id.
TagQuery
@strawberry.type
class TagQuery()Reads for a target row's tag assignments.
tag_assignments
@strawberry.field(name="tag_assignments")
def tag_assignments(target_type: str,
target_id: PublicID) -> list[TagAssignmentType]Return the tag assignments on one target row, REBAC-scoped by tag reach.
TagMutation
@strawberry.type
class TagMutation()Authored writes for the polymorphic tag edge (not an ordinary resource insert).
tag
@strawberry.mutation(name="tag", permission_classes=_TAGS_ADMIN_CLASSES)
def tag(target_type: str, target_id: PublicID,
tag_ids: list[PublicID]) -> list[TagAssignmentType]Attach each tag in tag_ids to the target row (idempotent per edge).
untag
@strawberry.mutation(name="untag", permission_classes=_TAGS_ADMIN_CLASSES)
def untag(target_type: str, target_id: PublicID,
tag_ids: list[PublicID]) -> boolDetach each tag in tag_ids from the target row.