Skip to content

angee.parties.schema

Strawberry-Django schema contributions for parties.

Party is the unified contact list (the multi-table-inheritance parent); Person and Organization are the concrete kinds you create and edit. A contact is created as a person or an organisation and deleted through the party (the parent delete cascades to the child row).

PartyType

python
@strawberry_django.type(Party)
class PartyType(AuthoredRefMixin, AngeeNode)

GraphQL projection of a party (the unified contact).

PersonType

python
@strawberry_django.type(Person)
class PersonType(AngeeNode)

GraphQL projection of a person.

circle_names

python
@strawberry_django.field(only=["id"])
def circle_names() -> list[str]

Return manager-prefetched, actor-visible circle names as chip values.

user

python
@strawberry_django.field(only=["user_id"])
def user() -> strawberry.ID | None

Return the linked platform user's public id, when this person is one.

OrganizationType

python
@strawberry_django.type(Organization)
class OrganizationType(AngeeNode)

GraphQL projection of an organisation.

HandleType

python
@strawberry_django.type(Handle)
class HandleType(AngeeNode)

GraphQL projection of a handle (a party's reachable address).

owner

python
@strawberry_django.field(only=["owner_id"])
def owner() -> strawberry.ID | None

Return the controlling user's public id, when a user has claimed this handle.

confidence

python
@strawberry_django.field(only=["party_id"], prefetch_related="party_links")
def confidence() -> float | None

Confidence of the link that resolved this handle's owner (null if unowned).

The rule lives on the model; the prefetch keeps it a single query per page.

PartyHandleType

python
@strawberry_django.type(PartyHandle)
class PartyHandleType(AngeeNode)

GraphQL projection of a confidence-bearing party↔handle link.

AddressType

python
@strawberry_django.type(Address)
class AddressType(AngeeNode)

GraphQL projection of a physical/postal address.

ContactFolderType

python
@strawberry_django.type(Folder)
class ContactFolderType(AngeeNode)

GraphQL projection of a contact folder (a synced address book's parties).

Named distinctly from storage's file FolderType — a different concept.

DirectoryType

python
@strawberry_django.type(Directory)
class DirectoryType(IntegrationLabelMixin, BridgeSyncStatusMixin, AngeeNode)

GraphQL projection of a connected contacts directory (e.g. a CardDAV source).

CircleType

python
@strawberry_django.type(Circle)
class CircleType(AngeeNode)

GraphQL projection of a circle (a private, overlapping grouping of parties).

member_count

python
@strawberry_django.field(only=["id"])
def member_count() -> int

Return the manager-annotated distinct subtree member count.

CircleMemberType

python
@strawberry_django.type(CircleMember)
class CircleMemberType(AngeeNode)

GraphQL projection of a party's circle membership.

MergeVetoType

python
@strawberry_django.type(MergeVeto)
class MergeVetoType(AngeeNode)

GraphQL projection of a durable canonical keep-separate pair.

RelationshipKindType

python
@strawberry_django.type(RelationshipKind)
class RelationshipKindType(AngeeNode)

GraphQL projection of a relationship-vocabulary kind.

PartyRelationshipType

python
@strawberry_django.type(Relationship)
class PartyRelationshipType(AngeeNode)

GraphQL projection of a typed party edge (anchor viewpoint).

DuplicatePartyCandidateType

python
@strawberry.type
class DuplicatePartyCandidateType()

Two actor-visible parties sharing one deterministic normalized handle.

PeopleWorkbenchScope

python
@strawberry.enum
class PeopleWorkbenchScope(Enum)

The bounded smart-view vocabulary for the People workbench.

PeopleWorkbenchType

python
@strawberry.type
class PeopleWorkbenchType()

Circle navigation, smart counts, and the selected people row scope.

PartiesReviewQuery

python
@strawberry.type
class PartiesReviewQuery()

Bounded read surfaces for party search and human review queues.

duplicate_party_candidates

python
@strawberry.field
def duplicate_party_candidates(
        limit: int = 50) -> list[DuplicatePartyCandidateType]

Return canonical party pairs that share a handle and have no merge veto.

search_parties

python
@strawberry.field
def search_parties(query: str, limit: int = 20) -> list[PersonType]

Return actor-visible people whose display name contains query.

people_workbench

python
@strawberry.field
def people_workbench(scope: PeopleWorkbenchScope = PeopleWorkbenchScope.ALL,
                     circle: strawberry.ID | None = None,
                     limit: int = 1000) -> PeopleWorkbenchType

Return actor-scoped People navigation and the selected scope's ids.

PartiesIdentityMutation

python
@strawberry.type
class PartiesIdentityMutation()

Human decisions on party identity claims and duplicate records.

confirm_party_handle

python
@strawberry.mutation
def confirm_party_handle(info: strawberry.Info,
                         id: strawberry.ID) -> PartyHandleType

Confirm a party↔handle link (the review queue's accept).

dismiss_party_handle

python
@strawberry.mutation
def dismiss_party_handle(info: strawberry.Info,
                         id: strawberry.ID) -> PartyHandleType

Dismiss a party↔handle link — the durable anti-link (the review queue's reject).

merge_parties

python
@strawberry.mutation
def merge_parties(
        into_id: strawberry.ID,
        from_id: strawberry.ID,
        field_overrides: strawberry.scalars.JSON | None = None) -> PartyType

Merge one writable party into another through the model-owned transaction.

veto_merge

python
@strawberry.mutation
def veto_merge(a_id: strawberry.ID, b_id: strawberry.ID) -> MergeVetoType

Persist the durable keep-separate decision for two writable parties.

PartiesDirectoryMutation

python
@strawberry.type
class PartiesDirectoryMutation()

Connect and manage contacts directories.

connect_card_dav_directory

python
@strawberry.mutation(permission_classes=ADMIN_PERMISSION_CLASSES)
def connect_card_dav_directory(info: strawberry.Info, name: str,
                               server_url: str, username: str,
                               password: str) -> DirectoryType

Create a Basic-auth credential and a connected CardDAV directory to sync.

server_url is the account/server URL — discovery finds the address books, so no exact collection URL is needed. The directory is created connected and owned by the calling admin; syncIntegration then pulls its contacts into one :class:~angee.parties.models.Folder per address book.

Released under the AGPL-3.0 License.