Sha256: ce6ccc8ddf915ec5136d0631356260b1175cb74ddbd358a0f6643e5a2b914773

Contents?: true

Size: 316 Bytes

Versions: 28

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    DateTimeType = GraphQL::ScalarType.define do
      name "DateTime"
      description "An ISO8601 date with time"
      coerce_input ->(value, _ctx) { Time.iso8601(value) }
      coerce_result ->(value, _ctx) { value.to_time.iso8601 }
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.5 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.4 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.3 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.2 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.1.rc1 app/types/decidim/core/date_time_type.rb
decidim-core-0.23.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.22.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.21.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.20.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.20.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.19.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.18.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.19.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.17.2 app/types/decidim/core/date_time_type.rb
decidim-core-0.18.0 app/types/decidim/core/date_time_type.rb
decidim-core-0.17.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.16.1 app/types/decidim/core/date_time_type.rb
decidim-core-0.17.0 app/types/decidim/core/date_time_type.rb