diff options
Diffstat (limited to 'app/graphql/resolvers/ci')
-rw-r--r-- | app/graphql/resolvers/ci/jobs_resolver.rb | 7 | ||||
-rw-r--r-- | app/graphql/resolvers/ci/runner_groups_resolver.rb | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/graphql/resolvers/ci/jobs_resolver.rb b/app/graphql/resolvers/ci/jobs_resolver.rb index 91f29948ad0..31cc350f331 100644 --- a/app/graphql/resolvers/ci/jobs_resolver.rb +++ b/app/graphql/resolvers/ci/jobs_resolver.rb @@ -19,10 +19,15 @@ module Resolvers required: false, description: 'Filter jobs by retry-status.' - def resolve(statuses: nil, security_report_types: [], retried: nil) + argument :when_executed, [::GraphQL::Types::String], + required: false, + description: 'Filter jobs by when they are executed.' + + def resolve(statuses: nil, security_report_types: [], retried: nil, when_executed: nil) jobs = init_collection(security_report_types) jobs = jobs.with_status(statuses) if statuses.present? jobs = jobs.retried if retried + jobs = jobs.with_when_executed(when_executed) if when_executed.present? jobs = jobs.latest if retried == false jobs diff --git a/app/graphql/resolvers/ci/runner_groups_resolver.rb b/app/graphql/resolvers/ci/runner_groups_resolver.rb index 3360e820bd2..c1d9bcbb9bb 100644 --- a/app/graphql/resolvers/ci/runner_groups_resolver.rb +++ b/app/graphql/resolvers/ci/runner_groups_resolver.rb @@ -6,7 +6,7 @@ module Resolvers include Gitlab::Graphql::Authorize::AuthorizeResource include ResolvesGroups - type Types::GroupConnection, null: true + type 'Types::GroupConnection', null: true authorize :read_runner authorizes_object! |