app/controllers/repositories_controller.rb
def unstar
    data = query UnstarMutation, id: params[:id]

    if repository = data.unstar
      respond_to do |format|
        format.js {
          render partial: "repositories/star", locals: { repository: data.unstar.starrable }
        }

        format.html {
          redirect_to "/repositories"
        }
      end
    else
      head :not_found
    end
  end
# Define query for repository listing.
#
# All queries MUST be assigned to constants and therefore be statically
# defined. Queries MUST NOT be generated at request time.
Define query for repository listing.
All queries MUST be assigned to constants and therefore be statically
defined. Queries MUST NOT be generated at request time.
Define query for repository listing . All queries MUST be assigned to constants and therefore be statically defined . Queries MUST NOT be generated at request time .
def unstar
    data = query UnstarMutation, id: params[:id]
    if repository = data.unstar
      respond_to do |format|
        format.js {
          render partial: "repositories/star", locals: { repository: data.unstar.starrable }
        }
        format.html {
          redirect_to "/repositories"
        }
      end
    else
      head :not_found
    end
  end
def unstar data = query UnstarMutation , id : params [ :id ] if repository = data . unstar respond_to do | format | format . js { render partial : "repositories/star" , locals : { repository : data . unstar . starrable } } format . html { redirect_to "/repositories" } end else head :not_found end end
Define query for repository listing.
Define query for repository listing .