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:

  1. name:

    The name of the GraphQL input type.

    Type
    str | None
    Default
    None
  2. one_of:

    Whether the input type is a oneOf type.

    Type
    bool | None
    Default
    None
  3. description:

    The description of the GraphQL input type.

    Type
    str | None
    Default
    None
  4. directives:

    The directives of the GraphQL input type.

    Type
    Sequence[object] | None
    Default
    ()