Difference between GraphQL and Rest API Explained

preview_player
Показать описание
#shorts #restapi #graphql #nodejs #programming
--
--
--
If you’re just as crazy for tech as us, we’d love to keep you around. You can also find us at:

We’ll be waiting to catch up with a fellow techie:)
Рекомендации по теме
Комментарии
Автор

Your camera movements are giving me a headache. Your answer is spot on and helpful. Please buy yourself a good tripod. Thanks

shyamvai
Автор

but my question is i can make rest api like in which you will pass id and you will get user related data and their post thy why should i use graphql

YashGupta-wwix
Автор

Great example 👍 we need these type of video concepts.

SigmaEmpire
Автор

I loved how you explained it with a very simple example, a very prime example of why examples are necessary with theory and people need to understand its importance

ahmermirza
Автор

The network traffic to the DB will remain the same, but the size of the data transferred from the server to the client will be reduced.

AndrewRayan
Автор

except you can have parameters in Rest API posts and get whatever you want within a single query

cinilaknedalm
Автор

Excellent - explained the reason graphql was created when REST api already existed

dledgerxyz
Автор

We can create one REST api which accept userId and return the posts with its user embedded in the post.

ehSamurai
Автор

Good explanation! IMO exposing complex structure to the client is only useful when your REST implementation does not satisfy your use-cases. I find GraphQL’s added complexity more of a risk than simply designing proper REST API’s that return data relevant to the use-cases.

baTonkaTruck
Автор

What are the disadvantages in the backend service?

vivekthearya
Автор

ok, If I make the request to rest api like /v1/user?showPosts=true

the only difference is you pass simple get params rather then fancy graphql query object

graphql has its strong sides no doubts, but organising resolves and cognitive overload it causes always holds me back from using it

vasylnekohda
Автор

Why can't the first itself be users/1/posts
It is possible right or am I wrong?

lockdowntrendings
Автор

At first I thought why Nora Fatehi asking graphql

rational_indian
Автор

Why do u need 2 reuqests its outta my mind

Specterharvi
Автор

But what If I send both the data in a single POST way also I can reduce the network calls...

Correct me if I lack anything

shivamrao
Автор

but my question is i can make rest api like in which you will pass id and you will get user related data and their post thy why should i use graphql

YashGupta-wwix
visit shbcf.ru