diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md index f6eaf59468b1026bd475fabefbeecf93db8059ac..c62b445380b6cfb7c62c69ebb704d028f70d8beb 100644 --- a/doc/development/api_graphql_styleguide.md +++ b/doc/development/api_graphql_styleguide.md @@ -1461,9 +1461,19 @@ issues(labelName: "bug", not: {labelName: "bug2"}) { } ``` -To avoid duplicated argument definitions, you can place these arguments in a reusable module (or -class, if the arguments are nested). Alternatively, you can consider to add a -[helper resolver method](https://gitlab.com/gitlab-org/gitlab/-/issues/258969). +You can use the `negated` helper from `Gitlab::Graphql::NegatableArguments` in your type or resolver. +For example: + +```ruby +extend ::Gitlab::Graphql::NegatableArguments + +negated do + argument :labels, [GraphQL::STRING_TYPE], + required: false, + as: :label_name, + description: 'Array of label names. All resolved merge requests will not have these labels.' +end +``` ### Metadata