Skip to content

angee.graphql.node

GraphQL identity primitive for Angee types.

AngeeNode

python
@strawberry.interface(name="Node")
class AngeeNode()

GraphQL object whose id field is the model's public id.

id

python
@strawberry.field(description="The public ID of this object.")
def id() -> PublicID

Return this row's public id.

display_name

python
@strawberry.field(description="Human-readable label for this object.")
def display_name() -> str

Return the record's human label — the uniform alias of str(self).

Every node carries a label without each type re-declaring one. A model that stores an editable, searchable label declares its own display_name field, which overrides this resolver on that type.

Released under the AGPL-3.0 License.