blob: 68e2ff692827e418214b7e57d0cc783df0112466 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
module Resolvers
class TopicsResolver < BaseResolver
type Types::Projects::TopicType, null: true
argument :search, GraphQL::Types::String,
required: false,
description: 'Search query for topic name.'
def resolve(**args)
if args[:search].present?
::Projects::Topic.search(args[:search]).order_by_non_private_projects_count
else
::Projects::Topic.order_by_non_private_projects_count
end
end
end
end
|