Commit f3e32907 authored by Brett Walker's avatar Brett Walker Committed by Peter Leitzen

Rename GraphQL Sort to SortEnum

and remove unused GraphQL Order enum
parent a6c0c3f4
......@@ -11,31 +11,32 @@ module Resolvers
description: 'The list of IIDs of issues, e.g., [1, 2]'
argument :state, Types::IssuableStateEnum,
required: false,
description: "Current state of Issue"
description: 'Current state of Issue'
argument :label_name, GraphQL::STRING_TYPE.to_list_type,
required: false,
description: "Labels applied to the Issue"
description: 'Labels applied to the Issue'
argument :created_before, Types::TimeType,
required: false,
description: "Issues created before this date"
description: 'Issues created before this date'
argument :created_after, Types::TimeType,
required: false,
description: "Issues created after this date"
description: 'Issues created after this date'
argument :updated_before, Types::TimeType,
required: false,
description: "Issues updated before this date"
description: 'Issues updated before this date'
argument :updated_after, Types::TimeType,
required: false,
description: "Issues updated after this date"
description: 'Issues updated after this date'
argument :closed_before, Types::TimeType,
required: false,
description: "Issues closed before this date"
description: 'Issues closed before this date'
argument :closed_after, Types::TimeType,
required: false,
description: "Issues closed after this date"
description: 'Issues closed after this date'
argument :search, GraphQL::STRING_TYPE, # rubocop:disable Graphql/Descriptions
required: false
argument :sort, Types::Sort, # rubocop:disable Graphql/Descriptions
argument :sort, Types::SortEnum,
description: 'Sort issues by this criteria',
required: false,
default_value: 'created_desc'
......
# frozen_string_literal: true
module Types
class Types::Order < Types::BaseEnum
value "id", "Created at date"
value "updated_at", "Updated at date"
end
end
# frozen_string_literal: true
module Types
class Types::Sort < Types::BaseEnum
value "updated_desc", "Updated at descending order"
value "updated_asc", "Updated at ascending order"
value "created_desc", "Created at descending order"
value "created_asc", "Created at ascending order"
end
end
# frozen_string_literal: true
module Types
class SortEnum < BaseEnum
graphql_name 'Sort'
description 'Common sort values'
value 'updated_desc', 'Updated at descending order'
value 'updated_asc', 'Updated at ascending order'
value 'created_desc', 'Created at descending order'
value 'created_asc', 'Created at ascending order'
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment