strawberry.types.object_type.StrawberryObjectDefinition
Encapsulates definitions for Input / Object / interface GraphQL Types.
In order get the definition from a decorated object you can use
has_object_definition
or get_object_definition
as a shortcut.
Constructor:
Signature:
Parameters:
-
name:
- Type
-
str
-
is_input:
- Type
-
bool
-
is_interface:
- Type
-
bool
-
origin:
- Type
-
Type[Any]
-
description:
- Type
-
str | None
-
interfaces:
- Type
-
List[StrawberryObjectDefinition]
-
extend:
- Type
-
bool
-
directives:
- Type
-
Sequence[object] | None
-
is_type_of:
- Type
-
Callable[[Any, GraphQLResolveInfo], bool] | None
-
resolve_type:
- Type
-
Callable[[Any, GraphQLResolveInfo, GraphQLAbstractType], str] | None
-
fields:
- Type
-
List[StrawberryField]
-
concrete_of:
- Type
-
StrawberryObjectDefinition | None
- Default
-
None
-
type_var_map:
- Type
-
Mapping[str, StrawberryType | type]
- Default
-
dict()
Methods:
-
resolve_generic
Signature:
Parameters:
-
wrapped_cls:
- Type
-
type
-
-
copy_with
Signature:
Parameters:
-
type_var_map:
- Type
-
Mapping[str, StrawberryType | type]
-
-
get_field
Signature:
Parameters:
-
python_name:
- Type
-
str
-
-
is_implemented_by
Signature:
Parameters:
-
root:
- Type
-
Type[WithStrawberryObjectDefinition]
-
Attributes:
-
name:
- Type
-
str
-
is_input:
- Type
-
bool
-
is_interface:
- Type
-
bool
-
origin:
- Type
-
Type[Any]
-
description:
- Type
-
str | None
-
interfaces:
- Type
-
List[StrawberryObjectDefinition]
-
extend:
- Type
-
bool
-
directives:
- Type
-
Sequence[object] | None
-
is_type_of:
- Type
-
Callable[[Any, GraphQLResolveInfo], bool] | None
-
resolve_type:
- Type
-
Callable[[Any, GraphQLResolveInfo, GraphQLAbstractType], str] | None
-
fields:
- Type
-
List[StrawberryField]
-
concrete_of:
Concrete implementations of Generic TypeDefinitions fill this in
- Type
-
StrawberryObjectDefinition | None
-
type_var_map:
- Type
-
Mapping[str, StrawberryType | type]
-
is_graphql_generic:
- Type
-
bool
-
is_specialized_generic:
- Type
-
bool
-
specialized_type_var_map:
- Type
-
Dict[str, type] | None
-
is_object_type:
- Type
-
bool
-
type_params:
- Type
-
List[TypeVar]
-
is_one_of:
- Type
-
bool