Skip to content

Commit abc18ad

Browse files
authored
Merge pull request MoonHighway#10 from MoonHighway/bug-6-fix
Adds githubLogin to postedPhotos Lookup
2 parents e0d09e8 + fc9d3e7 commit abc18ad

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

  • chapter-05/photo-share-api/resolvers
  • chapter-06/photo-share-api/resolvers
  • chapter-07/mock-photo-share-api

‎chapter-05/photo-share-api/resolvers/Type.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333

3434
postedPhotos: (parent, args, { db }) =>
3535
db.collection("photos")
36-
.find({ userID: parent._id })
36+
.find({ userID: parent.githubLogin })
3737
.toArray(),
3838

3939
inPhotos: async (parent, args, { db }) => {

‎chapter-06/photo-share-api/resolvers/Type.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333

3434
postedPhotos: (parent, args, { db }) =>
3535
db.collection("photos")
36-
.find({ userID: parent._id })
36+
.find({ userID: parent.githubLogin })
3737
.toArray(),
3838

3939
inPhotos: async (parent, args, { db }) => {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Mock GraphQL Photo Share Service
2+
======================

0 commit comments

Comments
 (0)