2

I'm trying to insert a new record with this mutation, however, I hit this error as below:

Attempting to deflate property 'start_date' on of class 'Schedule': datetime.date object expected, got '2020-04-01'

My start_date is defined as DateProperty()

Graphql mutation query

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

My schedule class

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()
xion
  • 1,209
  • 11
  • 17

0 Answers0