Class: Resolvers::BranchCommitResolver

Inherits:
BaseResolver
  • Object
show all
Defined in:
app/graphql/resolvers/branch_commit_resolver.rb

Instance Method Summary collapse

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(**args) ⇒ Object


9
10
11
12
13
14
15
# File 'app/graphql/resolvers/branch_commit_resolver.rb', line 9

def resolve(**args)
  return unless branch

  commit = branch.dereferenced_target

  ::Commit.new(commit, context[:branch_project]) if commit
end