From 434a0ce52d75e13d48eac9ce83774954c7c5d48d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 30 Nov 2020 11:02:35 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-7-stable-ee --- lib/gitlab/graphql/pagination/array_connection.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/gitlab/graphql/pagination/array_connection.rb (limited to 'lib/gitlab/graphql/pagination/array_connection.rb') diff --git a/lib/gitlab/graphql/pagination/array_connection.rb b/lib/gitlab/graphql/pagination/array_connection.rb new file mode 100644 index 00000000000..efc912eaeca --- /dev/null +++ b/lib/gitlab/graphql/pagination/array_connection.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# We use the Keyset / Stable cursor connection by default for ActiveRecord::Relation. +# However, there are times when that may not be powerful enough (yet), and we +# want to use standard offset pagination. +module Gitlab + module Graphql + module Pagination + class ArrayConnection < ::GraphQL::Pagination::ArrayConnection + prepend ::Gitlab::Graphql::ConnectionRedaction + include ::Gitlab::Graphql::ConnectionCollectionMethods + end + end + end +end -- cgit v1.2.3