Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Created June 2, 2019 14:05
Show Gist options
  • Select an option

  • Save desaijay315/4e8b5d1fb01d16f279c232a2857f0059 to your computer and use it in GitHub Desktop.

Select an option

Save desaijay315/4e8b5d1fb01d16f279c232a2857f0059 to your computer and use it in GitHub Desktop.
Post:{
author(parent,args,ctx,info){
return users.find((user) =>{
return user.id === parent.author
})
},
comments(parent,args,ctx,info){
return comments.find((comment) =>{
return comment.id === parent.commentId
})
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment