summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-06-26 18:31:05 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-07-04 10:53:39 +0200
commit04b046587fe609cd889f3fa518f08299abc61267 (patch)
tree634fc7d5e2a416950868700a82c171ff4f54239b /app/controllers
parentcd5789415b6e561564073693243e890e79596ed2 (diff)
downloadgitlab-ce-04b046587fe609cd889f3fa518f08299abc61267.tar.gz
Add pipeline lists to GraphQL
This adds Keyset pagination to GraphQL lists. PoC for that is pipelines on merge requests and projects. When paginating a list, the base-64 encoded id of the ordering field (in most cases the primary key) can be passed in the `before` or `after` GraphQL argument.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/pipelines_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 768595ceeb4..45cef123c34 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -13,7 +13,7 @@ class Projects::PipelinesController < Projects::ApplicationController
def index
@scope = params[:scope]
@pipelines = PipelinesFinder
- .new(project, scope: @scope)
+ .new(project, current_user, scope: @scope)
.execute
.page(params[:page])
.per(30)
@@ -178,7 +178,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def limited_pipelines_count(project, scope = nil)
- finder = PipelinesFinder.new(project, scope: scope)
+ finder = PipelinesFinder.new(project, current_user, scope: scope)
view_context.limited_counter_with_delimiter(finder.execute)
end