Sha256: 743ecff7daedf98548882c3d75fc065a43f4c919c4c6b8f111db962fa0739964
Contents?: true
Size: 335 Bytes
Versions: 1
Compression:
Stored size: 335 Bytes
Contents
# frozen_string_literal: true module GraphTypes DateTimeType = ::GraphQL::ObjectType.define do name 'DateTime' 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.2.0 | lib/graph_types/types/date_time_type.rb |