ruiancoolboss / Dev_English

To learn English in Dev
5 stars 1 forks source link

Task2: Which will you choose, REST Or GraphQL ? #2

Open ruiancoolboss opened 1 year ago

ruiancoolboss commented 1 year ago

The good ? The bad ? WHY ??

As tech lead, which will you choose ? To freshmen, which will you recommend to learn ?

gaofeiyang2022 commented 1 year ago

Graphql, if the project has multiple clients.

Jessica-make commented 1 year ago

I would like to use both of them.

ruiancoolboss commented 1 year ago

I would like to use both of them.

use both of them in one project ?

ruiancoolboss commented 1 year ago

Idealy let's have a post that more than 100 words, the more the better !

neil4dong commented 1 year ago

Form my view, graphql and restful cannot be compared together. The graphql focus on reducing the cost network roundtrip and duplicate http headers package. basically is all about performance stuff.

restful is just an api style, it is not enough expressive for many cases, sometimes you cannot find a perfect httpmethod for your api. If you integrated with some public platform like Tencent Alibaba, etc,you will not find restful style. so i am not recommended you to use restful style.

ruiancoolboss commented 1 year ago

Form my view, graphql and restful cannot be compared together. The graphql focus on reducing the cost network roundtrip and duplicate http headers package. basically is all about performance stuff.

restful is just an api style, it is not enough expressive for many cases, sometimes you cannot find a perfect httpmethod for your api. If you integrated with some public platform like Tencent Alibaba, etc,you will not find restful style. so i am not recommended you to use restful style.

deeply agree with you. Graphql is a solution, it could deal with a lot of quesiton we face in project, while Restfult api just a style, based on which we still have lots of tools / solutions need to be choose.