I really think that this error came from de db.js, did you uploaded it right? Can you upload this code in someplace? I may be able to help you if you do so.
That's the type checking (===) failing there. I had the same issue. Replace the find functions to double equal checks instead of triple, then it should work: users.find(user => user.id == id)
Not sure why the typecheck doesn't work. Perhaps the ID! in schema.graphql is returning a string by default?
Yup, that was it.
spent like 30 mins trying to get it to work, triple = kills the functionality
This helped me better understand '==' vs '==='
EDIT: 'ID' type is serialised to String in graphql. So really, the comparison works as expected. If anything, this needs better error handling.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.