Skip to content

Commit 89b1096

Browse files
committed
Work on nested query
1 parent 0bdaff3 commit 89b1096

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

graphQLApollo/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,14 @@ const resolvers = {
7070
});
7171
}
7272
}
73-
}
73+
},
74+
// AuthorsAndBooks: {
75+
// books(parent) {
76+
// return db.address.filter((a) => {
77+
// a.id === parent.id
78+
// })
79+
// }
80+
// },
7481
}
7582

7683
// The ApolloServer constructor requires two parameters: your schema

graphQLApollo/schema/schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const typeDefs = `#graphql
1111
id: Int!
1212
name: String!
1313
address: Int!
14+
books: [Book]
1415
}
1516
1617
type Address {

0 commit comments

Comments
 (0)