radar/twist-v2

View on GitHub
backend/lib/twist/web/graphql/resolvers/note.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Twist
  module Web
    module GraphQL
      module Resolvers
        class Note < Resolver
          def resolve(book_permalink:, number:)
            book = context[:book_repo].find_by_permalink(book_permalink)
            context[:book_note_repo].by_book_and_number(book.id, number)
          end
        end
      end
    end
  end
end