-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
I have a user <-> company relation
so I build like that
const UserSchema = new mongoose.Schema({
company: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Company'
}
})
after adding relation, it works with RootQuery.
However, it failed when I try to RootMutation user with companyId.
The graphql console shows that company is "GQLReference" not MongoID or String type
till I wrote
const UserSchema = new mongoose.Schema({
company: {
type: String,
}
})
to make RootQuery and RootMutation available.
Did I miss anything?
Metadata
Metadata
Assignees
Labels
No labels