2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class UserStarredProjectsResolver < BaseResolver
|
2021-04-29 21:17:54 +05:30
|
|
|
type Types::ProjectType.connection_type, null: true
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
argument :search, GraphQL::STRING_TYPE,
|
2021-04-29 21:17:54 +05:30
|
|
|
required: false,
|
|
|
|
description: 'Search query.'
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
alias_method :user, :object
|
|
|
|
|
|
|
|
def resolve(**args)
|
|
|
|
StarredProjectsFinder.new(user, params: args, current_user: current_user).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|