debian-mirror-gitlab/app/graphql/types/deployments_order_by_input_type.rb
2022-10-11 01:57:18 +05:30

24 lines
667 B
Ruby

# frozen_string_literal: true
module Types
class DeploymentsOrderByInputType < BaseInputObject
graphql_name 'DeploymentsOrderByInput'
description 'Values for ordering deployments by a specific field'
argument :created_at,
Types::SortDirectionEnum,
required: false,
description: 'Order by Created time.'
argument :finished_at,
Types::SortDirectionEnum,
required: false,
description: 'Order by Finished time.'
def prepare
raise GraphQL::ExecutionError, 'orderBy parameter must contain one key-value pair.' unless to_h.size == 1
super
end
end
end