Sha256: 6d86a47a9b543229afad0da0c9b0a47b4359bc09e29eae40bcf8b162da2791af

Contents?: true

Size: 575 Bytes

Versions: 5

Compression:

Stored size: 575 Bytes

Contents

# A complex input type for a field argument.
#
# @example An input type with name and number
#   PlayerInput = GraphQL::InputObjectType.define do
#     name("Player")
#     input_field :name, !types.String
#     input_field :number, !types.Int
#   end
#
class GraphQL::InputObjectType < GraphQL::ObjectType
  attr_accessor :input_fields
  defined_by_config :name, :description, :input_fields

  def input_fields=(new_fields)
    @input_fields = GraphQL::DefinitionHelpers::StringNamedHash.new(new_fields).to_h
  end

  def kind
    GraphQL::TypeKinds::INPUT_OBJECT
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
graphql-0.7.1 lib/graphql/input_object_type.rb
graphql-0.7.0 lib/graphql/input_object_type.rb
graphql-0.6.2 lib/graphql/input_object_type.rb
graphql-0.6.1 lib/graphql/input_object_type.rb
graphql-0.6.0 lib/graphql/input_object_type.rb