debian-mirror-gitlab/app/graphql/resolvers/groups_resolver.rb
2023-04-23 21:23:45 +05:30

24 lines
575 B
Ruby

# frozen_string_literal: true
module Resolvers
class GroupsResolver < BaseResolver
include ResolvesGroups
type "Types::GroupConnection", null: true
argument :search, GraphQL::Types::String,
required: false,
description: 'Search query for group name or group full path.'
private
# rubocop: disable CodeReuse/ActiveRecord
def resolve_groups(**args)
GroupsFinder
.new(context[:current_user], args)
.execute
.reorder(name: :asc)
end
# rubocop: enable CodeReuse/ActiveRecord
end
end