GraphQL was developed to rebuild Facebook's native mobile applications.
GraphQL is a query language. It provides a query in the form of a string that is sent to a server.
The server interprets the query and then returns the result in the form of JSON format to the client.
Following is a list of major advantages of GraphQL:
GraphQL is faster
Best for complex systems and microservices
No over-fetching and under-fetching problems
Hierarchical Structure
Defines a data shape
Code-sharing
Strongly typed
Protocol, not a storage
Introspective
Latest version not required
Although GraphQL has negligible disadvantages over its advantages, we are giving some disadvantages here. Following is the list of disadvantages of GraphQL:
GraphQL Query Complexity
GraphQL Caching
GraphQL Rate Limiting
reference:
https://www.javatpoint.com/graphql-advantages-and-disadvantages
youtube:
https://www.youtube.com/watch?v=8D9XnnjFGMs&ab_channel=Fireship
https://www.youtube.com/watch?v=Y0lDGjwRYKw&ab_channel=TheNetNinja
中文youtube介紹:
https://www.youtube.com/watch?v=00NKSvAraLQ&ab_channel=Bo-YiWu
開發GraphQL是為了重建Facebook的本地移動應用程序。
GraphQL是一種查詢語言。 它以字符串形式提供查詢,該查詢被發送到服務器。
服務器解釋查詢,然後將結果以JSON格式的形式返回給客戶端。
以下是GraphQL的主要優點:
querry, mutation,… 可指定request想要的值(欄位)
在 updateProfile 這個mutation執行時只回傳 id
儘管GraphQL的優點比其缺點可以忽略不計,但在此我們給出了一些缺點。 以下是GraphQL的缺點列表:
https://www.apollographql.com/
先打它想成一個用來幫助graphql開發的工具就好了
Simplify app development by combining APIs, databases, and microservices into a single data graph that you can query with GraphQL