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
Source
# File lib/graphql/schema/member/has_deprecation_reason.rb, line 33 def self.extended(child_class) super child_class.extend(ClassMethods) end
Calls superclass method
Public Instance Methods
# File lib/graphql/schema/member/has_deprecation_reason.rb, line 23 def deprecation_reason=(text) @deprecation_reason = text 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)