Module: IssueResolverArguments

Extended by:
ActiveSupport::Concern
Included in:
Resolvers::BaseIssuesResolver, Resolvers::IssueStatusCountsResolver
Defined in:
app/graphql/resolvers/concerns/issue_resolver_arguments.rb

Instance Method Summary collapse

Instance Method Details

#ready?(**args) ⇒ Boolean

Returns:

  • (Boolean)

100
101
102
103
104
105
106
107
108
# File 'app/graphql/resolvers/concerns/issue_resolver_arguments.rb', line 100

def ready?(**args)
  params_not_mutually_exclusive(args, mutually_exclusive_assignee_username_args)
  params_not_mutually_exclusive(args, mutually_exclusive_milestone_args)
  params_not_mutually_exclusive(args.fetch(:not, {}), mutually_exclusive_milestone_args)
  params_not_mutually_exclusive(args, mutually_exclusive_release_tag_args)
  validate_anonymous_search_access! if args[:search].present?

  super
end

#resolve_with_lookahead(**args) ⇒ Object


79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'app/graphql/resolvers/concerns/issue_resolver_arguments.rb', line 79

def resolve_with_lookahead(**args)
  # The project could have been loaded in batch by `BatchLoader`.
  # At this point we need the `id` of the project to query for issues, so
  # make sure it's loaded and not `nil` before continuing.
  parent = object.respond_to?(:sync) ? object.sync : object
  return Issue.none if parent.nil?

  # Will need to be made group & namespace aware with
  # https://gitlab.com/gitlab-org/gitlab-foss/issues/54520
  args[:iids] ||= [args.delete(:iid)].compact if args[:iid]
  args[:attempt_project_search_optimizations] = true if args[:search].present?

  prepare_assignee_username_params(args)
  prepare_release_tag_params(args)
  prepare_params(args, parent) if defined?(prepare_params)

  finder = IssuesFinder.new(current_user, args)

  continue_issue_resolve(parent, finder, **args)
end