Hey everyone :wave: We’ve recently updated the Nod...
# prisma-whats-new
n
Hey everyone 👋 We’ve recently updated the Node.js tutorial on How to GraphQL: https://www.howtographql.com/graphql-js/0-introduction/ I would love to get your feedback on it. Especially if you’re new to GraphQL (and/or Prisma) and are going through the tutorial, it would be super helpful if you could reach out to me and tell me if you had any sorts of issues with the tutorial. Maybe something wasn’t quite clear or confused you - in that case, please let me know! 🙌 Feel free to send me a direct message here on Slack ✉️
💯 1
🦜 2
👍 7
s
hi, i just finished this one three days ago and it went smoothly without any hurdle , but is this update going to change the workflow ? i mean do we have to re-read it ?
n
Hey @Sim, I indeed rewrote the entire tutorial. The basic learnings remain the same, but the flow of the tutorial has changed a bit. Instead of starting out with a GraphQL boilerplate project, you’re now starting completely from scratch (basically writing a “Hello World” GraphQL server first). Then adding the database layer only later in the process. I believe this flow is a bit more instructive for people to understand the core mechanics of a GraphQL server and how everything fits together 🙂
👍 1
s
Perfect - i will read it again, but with the boiler plate stuff it was good enough 🙂 . thank you
n
Let me know if you have any questions or anything is unclear! 😄
👍 1
s
Hi, I’m on the authentication section and I’m having a problem with the login mutation. I did some console.logs and bcrypt is throwing an error because it’s not getting a user.password object. I’m not sure where it’s supposed to get it from as the context query is only sending back an id?
The previous version was good, but the rewrite is much better as I have a much better idea of what’s going on, which makes a tremendous difference for me in finding bugs in my code. I very much appreciate the work you’ve put to it. Thanks!
👍 1
👌 1
UPDATE: I amended
{ id }
in the login mutation to
{ id, password }
and it resolved the issue!
n
Thanks, that’s great to hear! Were there any issues with the instructions that made you run into that problem?
s
Actually, it was because of your more instructive rewrite that was able to debug the issue. You just need to add to password to the snippet as I’ve described above.
Also the function call in the Query.js feed query reads “context.db.links” instead of “context.db.query.links”. Again, your explanation of the context argument helped me to spot this.
m
Hi! great tutorial! Very new to graphql everything went smoothly until now, except for implementing authentication. I get { "data": { "signup": null } } when executing the Signup mutation. No error in the console. Maybe I missed something when getting the authorization for the header... Any idea?
n
Hey @mad64, great to see you here 🙂 I reached out to you via a DM, would be great if you could send me your project somehow so I can debug it 👍