Commit 098b8508 authored by Alex Kalderimis's avatar Alex Kalderimis

Allow arguments to be deprecated

This uses the same deprecation syntax as for fields.
parent 30053faa
......@@ -6,6 +6,8 @@ module Resolvers
include ::Gitlab::Utils::StrongMemoize
include ::Gitlab::Graphql::GlobalIDCompatibility
argument_class ::Types::BaseArgument
def self.single
@single ||= Class.new(self) do
def ready?(**args)
......
# frozen_string_literal: true
module Types
class BaseArgument < GraphQL::Schema::Argument
include GitlabStyleDeprecations
def initialize(*args, **kwargs, &block)
kwargs = gitlab_deprecation(kwargs)
kwargs.delete(:deprecation_reason)
super(*args, **kwargs, &block)
end
end
end
......@@ -5,6 +5,8 @@ module Types
prepend Gitlab::Graphql::Authorize
include GitlabStyleDeprecations
argument_class ::Types::BaseArgument
DEFAULT_COMPLEXITY = 1
def initialize(*args, **kwargs, &block)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment