Class: Gitlab::Graphql::Extensions::ForwardOnlyExternallyPaginatedArrayExtension
- Inherits:
-
ExternallyPaginatedArrayExtension
- Object
- GraphQL::Schema::Field::ConnectionExtension
- ExternallyPaginatedArrayExtension
- Gitlab::Graphql::Extensions::ForwardOnlyExternallyPaginatedArrayExtension
- Defined in:
- lib/gitlab/graphql/extensions/forward_only_externally_paginated_array_extension.rb
Overview
This extension is meant for resolvers that only support forward looking pagination. So in order to limit confusion for allowed GraphQL pagination arguments on the field, we limit this to just ‘first` and `after`.
Instance Method Summary collapse
Methods inherited from ExternallyPaginatedArrayExtension
Instance Method Details
#apply ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/gitlab/graphql/extensions/forward_only_externally_paginated_array_extension.rb', line 8 def apply field.argument :after, GraphQL::Types::String, description: "Returns the elements in the list that come after the specified cursor.", required: false field.argument :first, GraphQL::Types::Int, description: "Returns the first _n_ elements from the list.", required: false end |