Class: Resolvers::BoardListsResolver

Inherits:
BaseResolver
  • Object
show all
Includes:
Gitlab::Graphql::Authorize::AuthorizeResource
Defined in:
app/graphql/resolvers/board_lists_resolver.rb

Constant Summary

Constants included from Gitlab::Graphql::Authorize::AuthorizeResource

Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR

Instance Method Summary collapse

Methods included from Gitlab::Graphql::Authorize::AuthorizeResource

#authorize!, #authorized_find!, #find_object, #raise_resource_not_available_error!

Methods inherited from BaseResolver

complexity, complexity_multiplier, #current_user, last, #object, resolver_complexity, #select_result, single, #single?, #synchronized_object

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#resolve(lookahead: nil, id: nil) ⇒ Object


15
16
17
18
19
20
21
22
23
24
25
# File 'app/graphql/resolvers/board_lists_resolver.rb', line 15

def resolve(lookahead: nil, id: nil)
  authorize!(board)

  lists = board_lists(id)

  if load_preferences?(lookahead)
    List.preload_preferences_for_user(lists, context[:current_user])
  end

  Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection.new(lists)
end