Welcome to mirror list, hosted at ThFree Co, Russian Federation.

frecent_projects_resolver.rb « users « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9508195800aef82ef6fae9ba1250d3ebebb06711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Resolvers
  module Users
    class FrecentProjectsResolver < BaseResolver
      include Gitlab::Graphql::Authorize::AuthorizeResource

      type [Types::ProjectType], null: true

      def resolve
        return unless current_user.present?

        ::Users::ProjectVisit.frecent_projects(user_id: current_user.id)
      end
    end
  end
end