module GraphQL::Schema::Member::HasDeprecationReason
Attributes
Returns
-
String, nil— Explains why this member was deprecated (if present, this will be marked deprecated in introspection)
Public Class Methods
(Module[untyped] child_class) → void
Source
# File lib/graphql/schema/member/has_deprecation_reason.rb, line 37 def self.extended(child_class) super child_class.extend(ClassMethods) end
Calls superclass method
Public Instance Methods
(String? text) → void
Source
# File lib/graphql/schema/member/has_deprecation_reason.rb, line 26 def deprecation_reason=(text) @deprecation_reason = text #: String? if text.nil? remove_directive(GraphQL::Schema::Directive::Deprecated) else # This removes a previously-attached directive, if there is one: directive(GraphQL::Schema::Directive::Deprecated, reason: text) end end
Set the deprecation reason for this member, or remove it by assigning nil
Parameters
-
text(String, nil)