GraphQL Introduction
Bobo Chen
Graph
Like the Jira Query Language
- the most powerful and flexible way to search
for your issues in Jira
QL (Query Language)
What is GraphQL
https://www.apollographql.com/blog/graphql/basics/graphql-vs-rest/
What is GraphQL
- A query language for API
- 前身是 Facebook Graph Query Language
- 朋友跟我有關聯,我可以拿到朋友的按讚清單、打卡記錄、開心農場
- Open source by Facebook
- Facebook announced GraphQL back in 2012 and open sourced it in 2015
Timeline
https://medium.com/graphql-portal/can-graphql-replace-rest-479aab585f9d
Benefits for us
Apps using GraphQL are fast and stable
- They control the data they get, not the
server.
A GraphQL Query is mirrored to it’s response.
Appendix
Appendix
- Graphql.org
- Can GraphQL Replace REST?. REST a robust, 20 years old standard… | by Maxime Topolov | GraphQL Portal
| Medium
Laravel+GraphQ
L
Schemas
● Query => 負責定義查詢時的參數以及處理。
● Mutation => 負責資料的更新或是資料新增。
● Type => 負責 Query 時回傳的資料格式。
測試工具
mll-lab/laravel-graphql-playground

GraphQL Introduction