Closed gHashTag closed 7 years ago
Greetings to the teacher!
The task is to make a repeating event.
Model
const EventSchema = new Schema({ name: String, description: String, event_times: [{ start_time: Date, end_time: Date }] }, { timestamps: true })
Schema
type EventTimes { start_time: Date! end_time: Date! }
I create a mutation
type Mutation { createEvent(name: String!, teacher: String!, cover: String, description: String, start_time: String, end_time: String, event_times: [EventTimes]): Event }
I receive an error:
Error: Expected [EventTimes] to be a GraphQL input type
What am I doing wrong?
Change type for input and that should work. Finally a type object and input object are not the same
Greetings to the teacher!
The task is to make a repeating event.
Model
Schema
I create a mutation
I receive an error:
Error: Expected [EventTimes] to be a GraphQL input type
What am I doing wrong?