Open dgtlmonk opened 5 years ago
Hey! Awesome tutorial and loving this.
Just a question and probably a suggestion.
https://github.com/iamshaunjp/graphql-playlist/blob/7a11b2b4fcf3c3766098bf3da1aa2b12e5cac77a/server/models/author.js#L4-L7
For clarity purpose, any reason books is not part of Author model? Since, books can be part of the graphql query.
books
Author
e.g.
const authorSchema = new Schema({ name: String, age: Number, books: Array });
GQL query
{ author(id: "cdf0506f8f561f87c1d8d140") { name books { name } } }
Let me know if this is reasonable and i'll send PR :)
Hey! Awesome tutorial and loving this.
Just a question and probably a suggestion.
https://github.com/iamshaunjp/graphql-playlist/blob/7a11b2b4fcf3c3766098bf3da1aa2b12e5cac77a/server/models/author.js#L4-L7
For clarity purpose, any reason
books
is not part ofAuthor
model? Since,books
can be part of the graphql query.e.g.
GQL query