diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/graphql/resolvers/snippets_resolver.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/graphql/resolvers/snippets_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/snippets_resolver.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/graphql/resolvers/snippets_resolver.rb b/app/graphql/resolvers/snippets_resolver.rb index 530a288a25b..77099565df0 100644 --- a/app/graphql/resolvers/snippets_resolver.rb +++ b/app/graphql/resolvers/snippets_resolver.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true +# rubocop:disable Graphql/ResolverType (inherited from ResolvesSnippets) module Resolvers class SnippetsResolver < BaseResolver @@ -8,11 +9,11 @@ module Resolvers alias_method :user, :object - argument :author_id, GraphQL::ID_TYPE, + argument :author_id, ::Types::GlobalIDType[::User], required: false, description: 'The ID of an author' - argument :project_id, GraphQL::ID_TYPE, + argument :project_id, ::Types::GlobalIDType[::Project], required: false, description: 'The ID of a project' @@ -36,9 +37,11 @@ module Resolvers private def snippet_finder_params(args) + # TODO: remove the type arguments when the compatibility layer is removed + # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883 super - .merge(author: resolve_gid(args[:author_id], :author), - project: resolve_gid(args[:project_id], :project), + .merge(author: resolve_ids(args[:author_id], ::Types::GlobalIDType[::User]), + project: resolve_ids(args[:project_id], ::Types::GlobalIDType[::Project]), explore: args[:explore]) end end |