Class: GraphQL::Introspection::EnumValueType

Inherits:
Introspection::BaseObject
  • Object
show all
Defined in:
lib/graphql/introspection/enum_value_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.resolve_is_deprecated(object, context) ⇒ Object

: (GraphQL::Schema::EnumValue object, GraphQL::Query::Context context) -> bool



17
18
19
# File 'lib/graphql/introspection/enum_value_type.rb', line 17

def self.resolve_is_deprecated(object, context)
  !!object.deprecation_reason
end

Instance Method Details

#is_deprecated ⇒ Object

: -> bool



22
23
24
# File 'lib/graphql/introspection/enum_value_type.rb', line 22

def is_deprecated
  self.class.resolve_is_deprecated(object, context)
end