首页 > 解决方案 > 为什么猫鼬在使用 GraphQL 时不更新文档?

问题描述

这里有问题,你知道吗?

switchEventSellingStarted: async(_, {name, sellingStarted}) => {
      Event.findOne({name: name}, function (err, event) {
        event.sellingStarted = sellingStarted;
        event.save();
        return event;
      });
    }

在此处输入图像描述

标签: mongoosegraphql

解决方案


推荐阅读