Sha256: 57f34a59703a8087a0dd658e92949087cb4eff5f2f8b72be405fa9ede34063fa

Contents?: true

Size: 332 Bytes

Versions: 10

Compression:

Stored size: 332 Bytes

Contents

GraphQL::STRING_TYPE = GraphQL::ScalarType.define do
  name "String"
  description "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text."

  coerce_result ->(value) { value.to_s }
  coerce_input ->(value) { value.is_a?(String) ? value : nil }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
graphql-1.2.6 lib/graphql/string_type.rb
graphql-1.2.5 lib/graphql/string_type.rb
graphql-1.2.4 lib/graphql/string_type.rb
graphql-1.2.3 lib/graphql/string_type.rb
graphql-1.2.2 lib/graphql/string_type.rb
graphql-1.2.1 lib/graphql/string_type.rb
graphql-1.2.0 lib/graphql/string_type.rb
graphql-1.1.0 lib/graphql/string_type.rb
graphql-1.0.0 lib/graphql/string_type.rb
graphql-0.19.4 lib/graphql/string_type.rb