Sha256: 1740d8cf9e273646537fb071118cc157117a95d62b640abff27390af6dd4665f

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true
GraphQL::Introspection::EnumValueType = GraphQL::ObjectType.define do
  name "__EnumValue"
  description "One possible value for a given Enum. Enum values are unique values, not a "\
              "placeholder for a string or numeric value. However an Enum value is returned in "\
              "a JSON response as a string."
  field :name, !types.String
  field :description, types.String
  field :isDeprecated, !types.Boolean do
    resolve ->(obj, a, c) { !!obj.deprecation_reason }
  end
  field :deprecationReason, types.String, property: :deprecation_reason
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-1.3.0 lib/graphql/introspection/enum_value_type.rb