2

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

尝试对“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()
4

0 回答 0