File tree 3 files changed +4
-9
lines changed
3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 38
38
"express" : " ^4.17.3" ,
39
39
"mongodb-memory-server" : " ^8.9.1" ,
40
40
"mongoose" : " ^6.2.5"
41
- },
42
- "config" : {
43
- "mongodbMemoryServer" : {
44
- "debug" : " 1"
45
- }
46
41
}
47
42
}
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export const Repository = createGraphqlModelServer({
127
127
// (without having to extend the contributor model explicitely)
128
128
reversedRelation : {
129
129
model : Contributor ,
130
- kind : "belongsToOne " ,
130
+ kind : "hasOneReversed " ,
131
131
foreignFieldName : "repository" ,
132
132
} ,
133
133
canRead : [ "guests" , "anyone" ] ,
Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ export const seedDemoDb = async () => {
16
16
const contributor = await contributorMongooseModel . create ( {
17
17
name : "John Doe" ,
18
18
} ) ;
19
- console . log ( "Done seeding db with 1 contributor" ) ;
19
+ console . log ( "Done seeding db with 1 contributor" , contributor . _id ) ;
20
20
const repoMongooseModel = mongoose . models [ Repository . name ] ;
21
21
await repoMongooseModel . deleteMany ( { } ) ;
22
- await repoMongooseModel . create ( {
22
+ const repository = await repoMongooseModel . create ( {
23
23
url : "https://github.com/VulcanJS/vulcan-npm" ,
24
24
contributorId : contributor . _id ,
25
25
} ) ;
26
- console . log ( "Done seeding db with 1 repository" ) ;
26
+ console . log ( "Done seeding db with 1 repository" , repository ) ;
27
27
} ;
28
28
29
29
/**
You can’t perform that action at this time.
0 commit comments