Class: Resolvers::MergeRequestsResolver

Inherits:
BaseResolver
  • Object
show all
Includes:
ResolvesMergeRequests
Defined in:
app/graphql/resolvers/merge_requests_resolver.rb

Constant Summary

Constants included from LooksAhead

LooksAhead::FEATURE_FLAG

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ResolvesMergeRequests

#early_return, #ready?, #resolve_with_lookahead

Methods included from LooksAhead

#apply_lookahead, #resolve

Methods inherited from BaseResolver

complexity, complexity_multiplier, #current_user, last, #object, resolver_complexity, #select_result, #single?, #synchronized_object

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Class Method Details

.singleObject


45
46
47
# File 'app/graphql/resolvers/merge_requests_resolver.rb', line 45

def self.single
  ::Resolvers::MergeRequestResolver
end

Instance Method Details

#no_results_possible?(args) ⇒ Boolean

Returns:

  • (Boolean)

49
50
51
# File 'app/graphql/resolvers/merge_requests_resolver.rb', line 49

def no_results_possible?(args)
  project.nil? || some_argument_is_empty?(args)
end

#some_argument_is_empty?(args) ⇒ Boolean

Returns:

  • (Boolean)

53
54
55
# File 'app/graphql/resolvers/merge_requests_resolver.rb', line 53

def some_argument_is_empty?(args)
  args.values.any? { |v| v.is_a?(Array) && v.empty? }
end