Create Appointment works
This commit is contained in:
@@ -9,11 +9,11 @@ const AppointmentSchema = new Schema({
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
timeStart: {
|
||||
start: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
timeEnd: {
|
||||
end: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
|
||||
@@ -97,10 +97,8 @@ export const resolvers = {
|
||||
// };
|
||||
// },
|
||||
|
||||
async createAppointment(root, {
|
||||
input
|
||||
}) {
|
||||
return await Appointment.create(input);
|
||||
async createAppointment(parent, args, context, info) {
|
||||
return await Appointment.create(args);
|
||||
},
|
||||
async updateAppointment(root, {
|
||||
_id,
|
||||
|
||||
@@ -20,7 +20,11 @@ type Feed {
|
||||
|
||||
type Mutation {
|
||||
createAppointment(
|
||||
input: AppointmentInput
|
||||
title: String!
|
||||
description: String!
|
||||
start: String!
|
||||
end: String!
|
||||
# input: AppointmentInput
|
||||
): Appointment!
|
||||
updateAppointment(
|
||||
_id: ID!,
|
||||
@@ -82,8 +86,8 @@ type Appointment {
|
||||
_id: ID!
|
||||
title: String!
|
||||
description: String!
|
||||
timeStart: Time!
|
||||
timeEnd: Time!
|
||||
start: Time!
|
||||
end: Time!
|
||||
deleted: Boolean
|
||||
# createdBy: User
|
||||
# follows: [Follow!]!
|
||||
@@ -92,8 +96,8 @@ type Appointment {
|
||||
input AppointmentInput {
|
||||
title: String!
|
||||
description: String!
|
||||
timeStart: Time!
|
||||
timeEnd: Time!
|
||||
start: Time!
|
||||
end: Time!
|
||||
}
|
||||
input AppointmentOrderByInput {
|
||||
description: Sort
|
||||
|
||||
Reference in New Issue
Block a user