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.

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

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.

AffiliationType

python
@strawberry_django.type(Affiliation)
class AffiliationType(AngeeNode)

GraphQL projection of an organisation affiliation.

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, AngeeNode)

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

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

Released under the AGPL-3.0 License.