2020-04-07 23:09:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Graphql
|
|
|
|
module Pagination
|
|
|
|
module Connections
|
|
|
|
def self.use(schema)
|
2021-01-20 04:10:52 -05:00
|
|
|
schema.connections.add(
|
|
|
|
::Gitlab::Graphql::Pagination::OffsetPaginatedRelation,
|
|
|
|
::Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection)
|
|
|
|
|
2020-04-07 23:09:31 -04:00
|
|
|
schema.connections.add(
|
|
|
|
ActiveRecord::Relation,
|
|
|
|
Gitlab::Graphql::Pagination::Keyset::Connection)
|
|
|
|
|
|
|
|
schema.connections.add(
|
|
|
|
Gitlab::Graphql::ExternallyPaginatedArray,
|
|
|
|
Gitlab::Graphql::Pagination::ExternallyPaginatedArrayConnection)
|
2020-11-19 07:09:26 -05:00
|
|
|
|
|
|
|
schema.connections.add(
|
|
|
|
Array,
|
|
|
|
Gitlab::Graphql::Pagination::ArrayConnection)
|
2020-04-07 23:09:31 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|