You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: docs_query.rb
    path of file: ./repos/bluedoc/app/graphql/queries
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Queries
  class QueryType < BaseQuery
    field :doc, Types::DocType, null: true, description: "Get Doc by id" do
      argument :id, Integer, required: true
    end

    def doc(id:)
    
    
    def repository_docs(params)
      params[:sort] ||= "created"

      @repository = Repository.find(params[:repository_id])
      authorize! :read, @repository

      @docs = @repository.docs.includes(:last_editor, :share)

      @docs = if params[:sort] == "created"
        @docs.order("id asc")
      else
        @docs.recent
      end