diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/graphql/types/ci/runner_web_url_edge.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/graphql/types/ci/runner_web_url_edge.rb')
-rw-r--r-- | app/graphql/types/ci/runner_web_url_edge.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/graphql/types/ci/runner_web_url_edge.rb b/app/graphql/types/ci/runner_web_url_edge.rb index 035d75c22c6..7dfcd1f3510 100644 --- a/app/graphql/types/ci/runner_web_url_edge.rb +++ b/app/graphql/types/ci/runner_web_url_edge.rb @@ -4,8 +4,6 @@ module Types module Ci # rubocop: disable Graphql/AuthorizeTypes class RunnerWebUrlEdge < ::Types::BaseEdge - include FindClosest - field :edit_url, GraphQL::Types::String, null: true, description: 'Web URL of the runner edit page. The value depends on where you put this field in the query. You can use it for projects or groups.', extras: [:parent] @@ -19,19 +17,18 @@ module Types @runner = node.node end + # here parent is a Keyset::Connection def edit_url(parent:) - runner_url(parent: parent, url_type: :edit_url) + runner_url(owner: parent.parent, url_type: :edit_url) end def web_url(parent:) - runner_url(parent: parent, url_type: :default) + runner_url(owner: parent.parent, url_type: :default) end private - def runner_url(parent:, url_type: :default) - owner = closest_parent([::Types::ProjectType, ::Types::GroupType], parent) - + def runner_url(owner:, url_type: :default) # Only ::Group is supported at the moment, future iterations will include ::Project. # See https://gitlab.com/gitlab-org/gitlab/-/issues/16338 case owner |