Commit 89a340bf authored by Alex Kalderimis's avatar Alex Kalderimis

Add type for pipeline stages resolver

This completes the elimination of todos for Graphql/ResolverType,
which is now a fully-enabled Rubocop rule.
parent 98f688ac
......@@ -368,6 +368,8 @@ Cop/SidekiqOptionsQueue:
Graphql/ResolverType:
Enabled: true
Exclude:
- 'app/graphql/resolvers/base_resolver.rb'
Include:
- 'app/graphql/resolvers/**/*'
- 'ee/app/graphql/resolvers/**/*'
......
......@@ -32,13 +32,6 @@ Graphql/IDType:
- 'app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb'
- 'app/graphql/resolvers/user_merge_requests_resolver.rb'
Graphql/ResolverType:
Exclude:
- 'app/graphql/resolvers/base_resolver.rb'
- 'app/graphql/resolvers/ci/pipeline_stages_resolver.rb'
- 'app/graphql/resolvers/users/group_count_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_base_resolver.rb'
Gitlab/PolicyRuleBoolean:
Exclude:
- 'ee/app/policies/ee/identity_provider_policy.rb'
......
......@@ -5,6 +5,9 @@ module Resolvers
class PipelineStagesResolver < BaseResolver
include LooksAhead
type Types::Ci::StageType.connection_type, null: true
extras [:lookahead]
alias_method :pipeline, :object
def resolve_with_lookahead
......
......@@ -5,6 +5,7 @@
# to finding the object to get vulnerabilities from so that developers writing
# new resolvers don't have to repeat it.
# rubocop: disable Graphql/ResolverType
module Resolvers
class VulnerabilitiesBaseResolver < BaseResolver
include Gitlab::Utils::StrongMemoize
......
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