strawberry.directive_field

Function to add metadata to a directive argument, like the GraphQL name.

Returns:

A StrawberryField object that can be used to customise a directive argument

Signature:

def directive_field(name: str, default: object = UNSET) -> Any:
...

Parameters:

  1. name:

    The GraphQL name of the directive argument

    Type
    str
  2. default:

    The default value of the argument

    Type
    object
    Default
    UNSET