StephenGrider / Lyrical-GraphQL

Starter project from a GraphQL course on Udemy.com
198 stars 371 forks source link

deleteSong mutation removing wrong id #41

Open yano1978 opened 2 years ago

yano1978 commented 2 years ago

On mutations.js, deleteSong's mutation is using findOneAndRemove method which removes the wrong ID. I would suggest to switch to findByIdAndRemove, otherwise on the apollo client mutation one is forced to use the _id workaround.

image