angee.graphql.data.resource_fields
GraphQL/Django projection into neutral resource-field descriptions.
resource_wire_field_name
def resource_wire_field_name(surface: type | None,
name: str | None) -> str | NoneReturn the actual GraphQL wire field name for a Strawberry surface field.
resource_wire_field_names
def resource_wire_field_names(
surface: type | None, *, exclude: tuple[str, ...] = ()) -> tuple[str, ...]Return all declared GraphQL wire field names for a Strawberry surface.
resource_type_name
def resource_type_name(surface: type | None) -> str | NoneReturn the GraphQL type name for surface when present.
resource_relation_surface
def resource_relation_surface(surface: type | None,
name: str) -> object | NoneReturn the object surface projected by one to-one field, if any.
require_resource_selection_path
def require_resource_selection_path(surface: type | None,
path: str,
*,
model_label: str,
fact: str = "subtitle") -> NoneRequire a dotted GraphQL selection path to resolve through surface.
Each segment is matched by its actual wire name. Intermediate fields must project another Strawberry object; walking through a scalar/list or naming a missing field fails during metadata emission, before a generated detail query can carry the invalid selection.
model_resource_fields
def model_resource_fields(
model: type[models.Model],
fields: tuple[str | data_contract.DataResourceFieldMetadata, ...],
*,
filter_fields: tuple[str, ...] = (),
order_fields: tuple[str, ...] = (),
aggregate_fields: tuple[str, ...] = (),
group_by_fields: tuple[str, ...] = (),
create_fields: tuple[str, ...] = (),
update_fields: tuple[str, ...] = (),
required_create_fields: tuple[str, ...] = (),
relation_axes: tuple[data_contract.DataRelationAxisMetadata, ...] = ()
) -> tuple[data_contract.DataResourceFieldMetadata, ...]Return metadata for model fields exposed outside the node class.
A caller may supply explicit metadata for a projected donor field whose shape the bare model cannot reconstruct (notably an enum). Ordinary string declarations retain the model-only fail-fast contract.
input_wire_fields
def input_wire_fields(surface: type | None, *,
exclude: tuple[str, ...] = ()) -> tuple[str, ...]Return declared input fields as GraphQL wire names.
required_input_wire_fields
def required_input_wire_fields(surface: type | None) -> tuple[str, ...]Return input fields whose value is required by GraphQL coercion.
resource_fields
def resource_fields(
node_type: type, model: type[models.Model] | None, *,
filter_fields: tuple[str, ...], order_fields: tuple[str, ...],
aggregate_fields: tuple[str, ...], group_by_fields: tuple[str, ...],
create_fields: tuple[str, ...], update_fields: tuple[str, ...],
required_create_fields: tuple[str, ...],
relation_axes: tuple[data_contract.DataRelationAxisMetadata, ...]
) -> tuple[data_contract.DataResourceFieldMetadata, ...]Return model resource field metadata from the declared node surface.
require_unique_resource_fields
def require_unique_resource_fields(
model_label: str, fields: tuple[data_contract.DataResourceFieldMetadata,
...]
) -> tuple[data_contract.DataResourceFieldMetadata, ...]Return resource field metadata after rejecting duplicate field names.