2020-09-08 11:08:41 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class UserStarredProjectsResolver < BaseResolver
|
2021-03-17 05:09:27 -04:00
|
|
|
type Types::ProjectType.connection_type, null: true
|
2020-09-08 11:08:41 -04:00
|
|
|
|
|
|
|
argument :search, GraphQL::STRING_TYPE,
|
2021-03-30 14:10:47 -04:00
|
|
|
required: false,
|
|
|
|
description: 'Search query.'
|
2020-09-08 11:08:41 -04:00
|
|
|
|
|
|
|
alias_method :user, :object
|
|
|
|
|
|
|
|
def resolve(**args)
|
|
|
|
StarredProjectsFinder.new(user, params: args, current_user: current_user).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|