Sha256: c6b5d6fc2425249314e3591de6044044d266ededfe6e924d44919ec4a4404af8

Contents?: true

Size: 617 Bytes

Versions: 12

Compression:

Stored size: 617 Bytes

Contents

GraphQL::Introspection::InputValueType = GraphQL::ObjectType.define do
  name "__InputValue"
  description "An input for a field or InputObject"
  field :name, !types.String, "The key for this value"
  field :description, types.String, "What this value is used for"
  field :type, -> { !GraphQL::Introspection::TypeType }, "The expected type for this value"
  field :defaultValue, types.String, "The value applied if no other value is provided" do
    resolve -> (obj, args, ctx) {
      value = obj.default_value
      if value.is_a?(String)
        "\"#{value}\""
      else
        value
      end
    }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
graphql-0.16.1 lib/graphql/introspection/input_value_type.rb
graphql-0.16.0 lib/graphql/introspection/input_value_type.rb
graphql-0.15.3 lib/graphql/introspection/input_value_type.rb
graphql-0.15.2 lib/graphql/introspection/input_value_type.rb
graphql-0.14.2 lib/graphql/introspection/input_value_type.rb
graphql-0.15.1 lib/graphql/introspection/input_value_type.rb
graphql-0.15.0 lib/graphql/introspection/input_value_type.rb
graphql-0.14.1 lib/graphql/introspection/input_value_type.rb
graphql-0.14.0 lib/graphql/introspection/input_value_type.rb
graphql-0.13.0 lib/graphql/introspection/input_value_type.rb
graphql-0.12.1 lib/graphql/introspection/input_value_type.rb
graphql-0.12.0 lib/graphql/introspection/input_value_type.rb