记录gql标签模板文字的输出?

时间:2018-09-07 11:00:09

标签: graphql apollo apollo-client

这是我在客户端上执行的graphql命令:

$("#example").on("click", ".edit-button", function() {
  $("#edit-modal").modal("show");
  saveChanges(this);
});
function saveChanges(k) { 
  $("#edit-confirm").click(function() {
  $(".itm-loader-modal").show();
  setTimeout(function() {editJob(k);},1000); 
  });
}
function editJob(currentButton) {
  $(".itm-loader-modal").fadeOut("slow");
  var editedName = $("#job-name").val();
  var editedDescription = $("#job-description").val();
  var editedCompany = $("#job-company").val();
  var data = {
   "name":editedName,
   "description": editedDescription,
   "company": editedCompany
  };
  var currentLine = $(currentButton).parent().parent().children(); 
  currentLine.eq(0).text(data.name);
  currentLine.eq(1).text(data.description);
  currentLine.eq(2).text(data.company);
  $("#edit-modal").modal("hide");
}

如何将带有gql标签的模板文字的输出记录到控制台?

0 个答案:

没有答案