Skip to content

Commit

Permalink
allow datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 10, 2020
1 parent 9240ba5 commit 5d51a6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/graphql/types/date_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
class DateType < BaseObject
description "Information about dates"

field :date, GraphQL::Types::ISO8601Date, null: false, description: "Date information for this resource"
field :date, GraphQL::Types::ISO8601DateTime, null: false, description: "Date information for this resource"
field :date_type, String, null: true, hash_key: "dateType", description: "The type of date"
end
2 changes: 1 addition & 1 deletion spec/graphql/types/date_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
subject { described_class }

it { is_expected.to have_field(:dateType).of_type("String") }
it { is_expected.to have_field(:date).of_type("ISO8601Date!") }
it { is_expected.to have_field(:date).of_type("ISO8601DateTime!") }
end
end

0 comments on commit 5d51a6a

Please sign in to comment.