到目前为止,我看到的所有教程都有非常简单的文档结构,正在转换为GraphQL模式。我想知道如何将mongoose模式转换为GraphQL。
_id: mongoose.Schema.Types.ObjectId,
booking: {
bookAny: {
type: Boolean,
default: true,
},
bookTopMgt: {
type: Boolean,
default: false,
},
bookPerDepartment: {
type: Boolean,
default: false,
},
perDepartmentBooking: [
{
departmentId: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Department',
},
},
],
},
谢谢。