debian-mirror-gitlab/lib/gitlab/graphql/pagination/connections.rb

28 lines
772 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
module Gitlab
module Graphql
module Pagination
module Connections
def self.use(schema)
2021-03-11 19:13:27 +05:30
schema.connections.add(
::Gitlab::Graphql::Pagination::OffsetPaginatedRelation,
::Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection)
2020-04-22 19:07:51 +05:30
schema.connections.add(
ActiveRecord::Relation,
Gitlab::Graphql::Pagination::Keyset::Connection)
schema.connections.add(
Gitlab::Graphql::ExternallyPaginatedArray,
Gitlab::Graphql::Pagination::ExternallyPaginatedArrayConnection)
2021-02-22 17:27:13 +05:30
schema.connections.add(
Array,
Gitlab::Graphql::Pagination::ArrayConnection)
2020-04-22 19:07:51 +05:30
end
end
end
end
end