diff options
Diffstat (limited to 'app/graphql/types/time_type.rb')
-rw-r--r-- | app/graphql/types/time_type.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/graphql/types/time_type.rb b/app/graphql/types/time_type.rb index 2db14953308..121515c04db 100644 --- a/app/graphql/types/time_type.rb +++ b/app/graphql/types/time_type.rb @@ -12,6 +12,9 @@ module Types DESC def self.coerce_input(value, ctx) + # arguments can be nil, so don't raise an error + return if value.nil? + Time.parse(value) rescue ArgumentError, TypeError => e raise GraphQL::CoercionError, e.message |