strawberry.input
Annotates a class as a GraphQL Input type.
Similar to @strawberry.type
, but for input types.
Returns:
The class.
Signature:
def input( cls: T | None = None, name: str | None = None, one_of: bool | None = None, description: str | None = None, directives: Sequence[object] | None = (),) -> : ...
Parameters:
-
name:
The name of the GraphQL input type.
- Type
-
str | None
- Default
-
None
-
one_of:
Whether the input type is a
oneOf
type.- Type
-
bool | None
- Default
-
None
-
description:
The description of the GraphQL input type.
- Type
-
str | None
- Default
-
None
-
directives:
The directives of the GraphQL input type.
- Type
-
Sequence[object] | None
- Default
-
()