Upgrade to Pro — share decks privately, control downloads, hide ads and more …

REST_vs_GraphQL_今夜はご注文はどっち.pdf

CypressKuo
February 23, 2021

 REST_vs_GraphQL_今夜はご注文はどっち.pdf

CypressKuo

February 23, 2021
Tweet

More Decks by CypressKuo

Other Decks in Technology

Transcript

  1. The material contained in this documentation is proprietary and confidential

    to PIXNET. Copies are made available on the basis that use is limited to the sole purpose of evaluating PIXNET’s capabilities. It is not permissible to use, modify, copy or disclose any information contained in this presentation document for any other purpose without the express written permission of PIXNET. If you are not the intended recipient of this material you are requested to take immediate steps to destroy it. Copyright © 2018 PIXNET. All rights reserved. REST vs GraphQL 今夜はご注文はどっち cypresskuo @JAAD例會 2020/10/06
  2. RESTful API 優點 • 簡單且統一的 API 接口 • 降低系統資料之間的耦合性 •

    好維護、除錯(搭配 Status Code) • 實做 Cache 較簡單(冪等性)
  3. GraphQL • 2012 年 Facebook 發明了 GraphQL • 2015 年開源

    • 2018 年 Facebook 將 GraphQL 項目轉移到新成立的 GraphQL 基金會(隸 屬於非營利性的 Linux 基金會)
  4. GraphQL 特性 • 單一個 API 接口 • 始終使用 POST 請求

    • 資料需求驅動設計(Driven by data requirement) • 強型別