debian-mirror-gitlab/app/graphql/resolvers/users/snippets_resolver.rb

23 lines
492 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
2021-01-29 00:20:46 +05:30
# rubocop:disable Graphql/ResolverType (inherited from ResolvesSnippets)
2020-01-01 13:55:28 +05:30
module Resolvers
module Users
class SnippetsResolver < BaseResolver
include ResolvesSnippets
alias_method :user, :object
argument :type, Types::Snippets::TypeEnum,
required: false,
description: 'The type of snippet'
private
def snippet_finder_params(args)
super.merge(author: user)
end
end
end
end