# Introduction
GraphQL 是一種應用程序層查詢語言,可以用于任何數據庫。它也是開源的(MIT許可證),由 Facebook 創建。它與REST 的主要區別在于 GraphQL 不使用端點,而是使用查詢(GraphQL does not use endpoints, but queries instead),并且大多數服務器語言都支持它,比如 JavaScript (Node.js)、Go、Ruby、PHP、Java和Python。
We'll now look at the main differences between GraphQL and REST.
GraphQL:
- The queries are readable
- You can evolve the API without versions
- Type system
- You can avoid doing multiple round trips to fetch related data
- It's easy to limit the set of data we need
REST:
- In REST, everything is a resource
- REST is schemaless
- You need versions to evolve the API
- It's hard to limit the set of data we need
- If you need data from different resources, you need to make multiple requests