尝试在“Schedule”类的 <unsaved node> 上缩小属性“date”:预期的 datetime.date 对象,得到字符串

问题描述

我正在尝试使用此突变插入新记录,但是,我遇到了如下错误

正在尝试对“Schedule”类的属性“start_date”进行压缩:预期为 datetime.date 对象,得到“2020-04-01”

我的 start_date 被定义为 Dateproperty()

Graphql 变异查询

mutation {
  CreateSchedule(
    name:"schedule2",options:"{}",start_date:"2020-04-01",days:[0,1,2],interval:60,email:"",) {
    uid
  }
}

我的课表

class Schedule(Structurednode):
    uid = UniqueIdproperty()
    name = StringProperty(unique_index=True)
    start_date = DateProperty(format='YYYY-MM-DD')
    end_date = Dateproperty()
    start_time = Stringproperty()
    end_time = Stringproperty()
    days = Arrayproperty()
    interval = Integerproperty()
    email = Emailproperty()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)