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,
|
|
|
|
required: false,
|
2021-01-11 19:10:42 -05:00
|
|
|
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
|