Class: Resolvers::WorkItems::WorkItemDiscussionsResolver
- Inherits:
-
BaseResolver
- Object
- GraphQL::Schema::Resolver
- BaseResolver
- Resolvers::WorkItems::WorkItemDiscussionsResolver
- Defined in:
- app/graphql/resolvers/work_items/work_item_discussions_resolver.rb
Constant Summary
Constants included from Gitlab::Graphql::Authorize::AuthorizeResource
Gitlab::Graphql::Authorize::AuthorizeResource::ConfigurationError, Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR
Class Method Summary collapse
- .calculate_ext_conn_complexity ⇒ Object
- .complexity_multiplier(args) ⇒ Object
- .field_options ⇒ Object
Instance Method Summary collapse
Methods included from Gitlab::Graphql::Authorize::AuthorizeResource
#authorize!, #authorized_find!, #authorized_resource?, #find_object, #raise_resource_not_available_error!
Methods inherited from BaseResolver
as_single, authorization, authorized?, before_connection_authorization, before_connection_authorization_block, calls_gitaly!, complexity, #current_user, last, #object, #offset_pagination, requires_argument!, resolver_complexity, #select_result, single, #single?, single_definition_blocks, singular_type, when_single
Methods included from Gitlab::Utils::Override
#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!
Class Method Details
.calculate_ext_conn_complexity ⇒ Object
39 40 41 |
# File 'app/graphql/resolvers/work_items/work_item_discussions_resolver.rb', line 39 def self.calculate_ext_conn_complexity true end |
.complexity_multiplier(args) ⇒ Object
43 44 45 |
# File 'app/graphql/resolvers/work_items/work_item_discussions_resolver.rb', line 43 def self.complexity_multiplier(args) 0.05 end |
.field_options ⇒ Object
34 35 36 37 |
# File 'app/graphql/resolvers/work_items/work_item_discussions_resolver.rb', line 34 def self. # we manage the pagination manually through external array, so opt out of the connection field extension super.merge(connection: false) end |
Instance Method Details
#resolve(**args) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'app/graphql/resolvers/work_items/work_item_discussions_resolver.rb', line 24 def resolve(**args) finder = Issuable::DiscussionsListService.new(current_user, work_item, params(args)) Gitlab::Graphql::ExternallyPaginatedArray.new( finder.paginator.cursor_for_previous_page, finder.paginator.cursor_for_next_page, *finder.execute ) end |