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
@strawberry_django.type(Party)
class PartyType(AuthoredRefMixin, AngeeNode)GraphQL projection of a party (the unified contact).
PersonType
@strawberry_django.type(Person)
class PersonType(AngeeNode)GraphQL projection of a person.
user
@strawberry_django.field(only=["user_id"])
def user() -> strawberry.ID | NoneReturn the linked platform user's public id, when this person is one.
OrganizationType
@strawberry_django.type(Organization)
class OrganizationType(AngeeNode)GraphQL projection of an organisation.
HandleType
@strawberry_django.type(Handle)
class HandleType(AngeeNode)GraphQL projection of a handle (a party's reachable address).
confidence
@strawberry_django.field(only=["party_id"], prefetch_related="party_links")
def confidence() -> float | NoneConfidence 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
@strawberry_django.type(PartyHandle)
class PartyHandleType(AngeeNode)GraphQL projection of a confidence-bearing party↔handle link.
AddressType
@strawberry_django.type(Address)
class AddressType(AngeeNode)GraphQL projection of a physical/postal address.
AffiliationType
@strawberry_django.type(Affiliation)
class AffiliationType(AngeeNode)GraphQL projection of an organisation affiliation.
ContactFolderType
@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
@strawberry_django.type(Directory)
class DirectoryType(IntegrationLabelMixin, AngeeNode)GraphQL projection of a connected contacts directory (e.g. a CardDAV source).
PartiesDirectoryMutation
@strawberry.type
class PartiesDirectoryMutation()Connect and manage contacts directories.
connect_card_dav_directory
@strawberry.mutation(permission_classes=ADMIN_PERMISSION_CLASSES)
def connect_card_dav_directory(info: strawberry.Info, name: str,
server_url: str, username: str,
password: str) -> DirectoryTypeCreate a Basic-auth credential and an active 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 active and owned by the calling admin; syncIntegration then pulls its contacts into one :class:~angee.parties.models.Folder per address book.