Sha256: 67bb47075d2e68f5856d283ea75f66e783a40f9c110ecfd61604fb270446ef2a

Contents?: true

Size: 833 Bytes

Versions: 78

Compression:

Stored size: 833 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    class FieldType < Introspection::BaseObject
      graphql_name "__Field"
      description "Object and Interface types are described by a list of Fields, each of which has "\
                  "a name, potentially a list of arguments, and a return type."
      field :name, String, null: false
      field :description, String, null: true
      field :args, [GraphQL::Schema::LateBoundType.new("__InputValue")], null: false
      field :type, GraphQL::Schema::LateBoundType.new("__Type"), null: false
      field :is_deprecated, Boolean, null: false
      field :deprecation_reason, String, null: true

      def is_deprecated
        !!@object.deprecation_reason
      end

      def args
        @context.warden.arguments(@object)
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
graphql-1.9.6 lib/graphql/introspection/field_type.rb
graphql-1.9.5 lib/graphql/introspection/field_type.rb
graphql-1.9.4 lib/graphql/introspection/field_type.rb
graphql-1.9.3 lib/graphql/introspection/field_type.rb
graphql-1.9.2 lib/graphql/introspection/field_type.rb
graphql-1.8.17 lib/graphql/introspection/field_type.rb
graphql-1.8.16 lib/graphql/introspection/field_type.rb
graphql-1.9.1 lib/graphql/introspection/field_type.rb
graphql-1.9.0 lib/graphql/introspection/field_type.rb
graphql-1.8.15 lib/graphql/introspection/field_type.rb
graphql-1.9.0.pre4 lib/graphql/introspection/field_type.rb
graphql-1.8.14 lib/graphql/introspection/field_type.rb
graphql-1.9.0.pre3 lib/graphql/introspection/field_type.rb
graphql-1.9.0.pre2 lib/graphql/introspection/field_type.rb
graphql-1.8.13 lib/graphql/introspection/field_type.rb
graphql-1.8.12 lib/graphql/introspection/field_type.rb
graphql-1.9.0.pre1 lib/graphql/introspection/field_type.rb
graphql-1.8.11 lib/graphql/introspection/field_type.rb
graphql-1.8.10 lib/graphql/introspection/field_type.rb
graphql-1.8.9 lib/graphql/introspection/field_type.rb