Class: Types::TimestampRangeInputType
- Inherits:
-
Object
- Object
- Types::TimestampRangeInputType
- Defined in:
- app/graphql/types/timestamp_range_input_type.rb
Overview
rubocop:disable Gitlab/BoundedContexts – not added to Gitlab context for consistency with other generic types
Instance Method Summary collapse
Instance Method Details
#prepare ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/graphql/types/timestamp_range_input_type.rb', line 9 def prepare # Reject equal timestamps because DB timestamp precision is much higher # than what a user can query and may lead to confusion. if self[:end] && self[:start] && self[:end] == self[:start] raise ::Gitlab::Graphql::Errors::ArgumentError, 'start must be before end' end super end |