Commit a374ce23 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ajk-281697-resolver-types' into 'master'

Add type annotations to graphql resolvers

See merge request gitlab-org/gitlab!47647
parents 54735029 68a49c5e
......@@ -45,13 +45,8 @@ Graphql/ResolverType:
- 'app/graphql/resolvers/ci/pipeline_stages_resolver.rb'
- 'app/graphql/resolvers/commit_pipelines_resolver.rb'
- 'app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb'
- 'app/graphql/resolvers/group_issues_resolver.rb'
- 'app/graphql/resolvers/group_merge_requests_resolver.rb'
- 'app/graphql/resolvers/members_resolver.rb'
- 'app/graphql/resolvers/merge_request_pipelines_resolver.rb'
- 'app/graphql/resolvers/merge_request_resolver.rb'
- 'app/graphql/resolvers/merge_requests_resolver.rb'
- 'app/graphql/resolvers/project_merge_requests_resolver.rb'
- 'app/graphql/resolvers/project_pipelines_resolver.rb'
- 'app/graphql/resolvers/users/group_count_resolver.rb'
- 'ee/app/graphql/resolvers/ci/jobs_resolver.rb'
......
......@@ -4,6 +4,7 @@ module LooksAhead
extend ActiveSupport::Concern
included do
extras [:lookahead]
attr_accessor :lookahead
end
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType (inherited from IssuesResolver)
module Resolvers
class GroupIssuesResolver < IssuesResolver
......
......@@ -6,6 +6,8 @@ module Resolvers
alias_method :group, :synchronized_object
type Types::MergeRequestType.connection_type, null: true
include_subgroups 'merge requests'
accept_assignee
accept_author
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType (inherited from MilestonesResolver)
module Resolvers
class GroupMilestonesResolver < MilestonesResolver
......
......@@ -5,6 +5,8 @@ module Resolvers
include Gitlab::Graphql::Authorize::AuthorizeResource
include LooksAhead
type Types::MemberInterface.connection_type, null: true
argument :search, GraphQL::STRING_TYPE,
required: false,
description: 'Search query'
......
......@@ -6,6 +6,8 @@ module Resolvers
alias_method :project, :synchronized_object
type ::Types::MergeRequestType, null: true
argument :iid, GraphQL::STRING_TYPE,
required: true,
as: :iids,
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType (inherited from MembersResolver)
module Resolvers
class ProjectMembersResolver < MembersResolver
type Types::MemberInterface, null: true
authorize :read_project_member
private
......
......@@ -2,6 +2,7 @@
module Resolvers
class ProjectMergeRequestsResolver < MergeRequestsResolver
type ::Types::MergeRequestType.connection_type, null: true
accept_assignee
accept_author
end
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType (inherited from MilestonesResolver)
module Resolvers
class ProjectMilestonesResolver < MilestonesResolver
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType
# rubocop:disable Graphql/ResolverType (inherited from ResolvesSnippets)
module Resolvers
module Projects
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType
# rubocop:disable Graphql/ResolverType (inherited from ResolvesSnippets)
module Resolvers
class SnippetsResolver < BaseResolver
......
# frozen_string_literal: true
# rubocop:disable Graphql/ResolverType
# rubocop:disable Graphql/ResolverType (inherited from ResolvesSnippets)
module Resolvers
module Users
......
......@@ -86,9 +86,7 @@ module Types
end
field :group_members,
Types::GroupMemberType.connection_type,
description: 'A membership of a user within this group',
extras: [:lookahead],
resolver: Resolvers::GroupMembersResolver
field :container_repositories,
......
......@@ -161,7 +161,6 @@ module Types
resolver: Resolvers::ProjectMilestonesResolver
field :project_members,
Types::MemberInterface.connection_type,
description: 'Members of the project',
resolver: Resolvers::ProjectMembersResolver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment