Sha256: 4b83dab47d9333f7630f83c2959fdc044e2947ccf582757b6aba0886f13edc1d
Contents?: true
Size: 339 Bytes
Versions: 1
Compression:
Stored size: 339 Bytes
Contents
# frozen_string_literal: true module GraphTypes DateTimeType = ::GraphQL::ObjectType.define do name 'DateTimeType' field :formatted, types.String do argument :strftime, types.String, default_value: '%FT%T%Z' resolve ->(object, args, _context) do object.strftime args[:strftime] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graph_types-0.1.0 | lib/graph_types/date_time_type.rb |