I’m implementing a step-by-step Apollo Tutorial on my project. I created a REST API on my localhost with Express, and everything worked fine until this part. I have no problem with my first client query getting all stocks but I’m getting “undefined” on my second query with argument in the Express server console and “INTERNAL_SERVER_ERROR” and “stacktrace”: [“Error: Cannot return null for non-nullable field Stock.id…] in Apollo Explorer or Apollo Server.
I’m getting response without any problem when i access it through my browser (ex: …localhost:5000/stock/2).
I’m stuck with this; I think there is a problem with accepting requests (ex: sending via “variables” json) or something missing in my Express Rest API endpoints.
I shared all my files in one js file (because I can’t share more than 2 files here); you can edit them.
All files in one
https://codefile.io/f/I6vdsaumWC
stocks.json
https://codefile.io/f/cdwWoh3QMv