Skip to content

Commit c94e466

Browse files
authored
Fix README example, closes #23
1 parent 1c0fa85 commit c94e466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ class Posts extends MongoDataSource {
113113

114114
const resolvers = {
115115
Post: {
116-
author: (post, _, { users }) => users.getUser(post.authorId)
116+
author: (post, _, { dataSources: { users } }) => users.getUser(post.authorId)
117117
},
118118
User: {
119-
posts: (user, _, { posts }) => posts.getPosts(user.postIds)
119+
posts: (user, _, { dataSources: { posts } }) => posts.getPosts(user.postIds)
120120
}
121121
}
122122

0 commit comments

Comments
 (0)