argument
Function to add metadata to an argument, like a description or deprecation reason.
Returns:
A StrawberryArgumentAnnotation object that can be used to customise an argument
Signature:
Parameters:
-
description:
The GraphQL description of the argument
- Type
-
str | None
- Default
-
None
-
name:
The GraphQL name of the argument
- Type
-
str | None
- Default
-
None
-
deprecation_reason:
The reason why this argument is deprecated, setting this will mark the argument as deprecated
- Type
-
str | None
- Default
-
None
-
directives:
The directives to attach to the argument
- Type
-
Iterable[object]
- Default
-
()
-
metadata:
Metadata to attach to the argument, this can be used to store custom data that can be used by custom logic or plugins
- Type
-
Mapping[Any, Any] | None
- Default
-
None