mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 02:34:28 +11:00
Worked on the schema code
This commit is contained in:
@@ -21,7 +21,7 @@ let authors = [
|
||||
},
|
||||
];
|
||||
|
||||
//insert the authors into the books
|
||||
//insert the authors into the books (relationship)
|
||||
authors = authors.map(a => {
|
||||
a.books = a.books.map(b => {
|
||||
b.author = a;
|
||||
@@ -39,4 +39,4 @@ authors.forEach(a => books = books.concat(a.books));
|
||||
module.exports = {
|
||||
authors,
|
||||
books,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user