Sha256: e6c20e18f7b0df9c7ec6aef2a662eaedf6b69282a9e83dbd76a3f6857943c9ab

Contents?: true

Size: 594 Bytes

Versions: 6

Compression:

Stored size: 594 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::BaseType
  attr_accessor :name, :description, :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

6 entries across 6 versions & 1 rubygems

Version Path
graphql-0.9.5 lib/graphql/input_object_type.rb
graphql-0.9.4 lib/graphql/input_object_type.rb
graphql-0.9.3 lib/graphql/input_object_type.rb
graphql-0.9.2 lib/graphql/input_object_type.rb
graphql-0.8.1 lib/graphql/input_object_type.rb
graphql-0.8.0 lib/graphql/input_object_type.rb