Sha256: 96a0612ffaea3e91213e2d04f4f2f72af5223a55e286f36d921eeafe538f4ced

Contents?: true

Size: 230 Bytes

Versions: 12

Compression:

Stored size: 230 Bytes

Contents

GraphQL::ID_TYPE = GraphQL::ScalarType.define do
  name "ID"
  coerce_result -> (value) { value.to_s }
  coerce_input -> (value) {
    case value
    when String, Fixnum, Bignum
      value.to_s
    else
      nil
    end
  }
end

Version data entries

12 entries across 12 versions & 1 rubygems

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