Creating Japanese Resources Social Network #2

Creating Japanese Resources Social Network #2

Current Tech Stack : Next.js,Graphql,Mongodb,GetStream

Table of contents

No heading

No headings in the article.

Currently, I have the site live at this URL: (japanese-resources.com)

The Dev site with the new features is japanese-resource-app.vercel.app. It will have a lot of beta features with bugs.

Github Code if you would like to follow along github.com/Andres9888/japanese-resource-app

Working on fixing a bug where I was getting undefined no matter for my user token request and was not sure why.

It took me longer than I wanted to fix this bug and I was not sure if my API logic was not correct or maybe something with my Axios call not being correct or even the useEffect logic I was using to make the request not being correct.

What led me down the wrong path initially was me using postman to call my API and assuming the postman request would be the same as the Axios request.

I was wrong with this because postman will give you a raw request almost exactly how your API is sending it but Axios sends you the additional information that looks something like the picture below.

image.png

It adds your request in the data object so if you are not aware of this you might assume you are getting it like how postman shows it to you.

The real issue is something I will make a better habit of doing. This is to start with what I am getting from the actual component or function I am working with and not make an assumption. This will be for the future and I am sure there are other things or habits that I will find and need to fix.

Thanks, everyone I hope this is helpful. I am trying to make it a habit of writing and getting better it at.