GraphQL API Design (API-University Series) (Volume 5)
暫譯: GraphQL API 設計(API 大學系列)(第 5 卷)

Matthias Biehl

  • 出版商: W. W. Norton
  • 出版日期: 2018-01-29
  • 售價: $1,020
  • 貴賓價: 9.5$969
  • 語言: 英文
  • 頁數: 100
  • 裝訂: Paperback
  • ISBN: 1979717524
  • ISBN-13: 9781979717526
  • 相關分類: Web API
  • 海外代購書籍(需單獨結帳)

商品描述

Want to build APIs like Facebook? Since Facebook's framework for building APIs, GraphQL, has become publicly available, this ambition seems to be within reach for many companies. And that is great. But first, let's learn what GraphQL really is and – maybe even more importantly – let's figure out how to apply GraphQL to build APIs that consumers love. In this book, we take a hands-on approach to learning GraphQL. We first explore the concepts of the two GraphQL languages using examples. Then we start writing some code for our first GraphQL API. We develop this API step by step, from creating a schema and resolving queries, over mocking data and connecting data sources all the way to developing mutations and setting up event subscriptions. Are your API consumers important to you? This book shows you how to apply a consumer-oriented design process for GraphQL APIs, so you can deliver what your consumers really want: an API that solves their problems and offers a great developer experience. Do you want to enable the API consumers so they can build great apps? This book explains the GraphQL query language, which allows the API consumers to retrieve data, write data and get notified when data changes. More importantly, you let them decide, which data they really need from the API. Do you want to make your API easy and intuitive to use? This book shows you how to use the GraphQL schema language to define a type system for your API, which serves as a reference documentation and helps your API consumers write queries that are syntactically correct. Do you want to profit from what has worked for others? This book provides a collection of best practices for GraphQL that have worked for other companies, e.g. regarding pagination, authentication and caching. GraphQL and REST are competing philosophies for building APIs. It is not in the scope of this book to compare or discuss the two approaches. The focus of this book is on a hands-on approach for learning GraphQL.

商品描述(中文翻譯)

想要像 Facebook 一樣建立 API 嗎?自從 Facebook 的 API 建構框架 GraphQL 公開以來,這個目標對許多公司來說似乎變得觸手可及。這真是太好了。但首先,讓我們了解 GraphQL 真的是什么,以及——也許更重要的是——我們如何應用 GraphQL 來構建消費者喜愛的 API。在這本書中,我們採取實作導向的方式來學習 GraphQL。我們首先通過範例探索兩種 GraphQL 語言的概念。然後,我們開始為我們的第一個 GraphQL API 編寫一些代碼。我們一步一步地開發這個 API,從創建架構和解析查詢,模擬數據和連接數據源,一直到開發變更和設置事件訂閱。你的 API 消費者對你來說重要嗎?這本書向你展示如何應用以消費者為導向的設計流程來構建 GraphQL API,這樣你就可以提供消費者真正想要的東西:一個解決他們問題並提供良好開發者體驗的 API。你想讓 API 消費者能夠構建出色的應用程序嗎?這本書解釋了 GraphQL 查詢語言,這使得 API 消費者能夠檢索數據、寫入數據並在數據變更時獲得通知。更重要的是,你讓他們決定他們真正需要從 API 獲取哪些數據。你想讓你的 API 易於使用且直觀嗎?這本書向你展示如何使用 GraphQL 架構語言來定義 API 的類型系統,這作為參考文檔並幫助你的 API 消費者編寫語法正確的查詢。你想從其他人成功的經驗中獲利嗎?這本書提供了一系列 GraphQL 的最佳實踐,這些實踐在其他公司中已經取得了成功,例如關於分頁、身份驗證和緩存的做法。GraphQL 和 REST 是構建 API 的競爭哲學。本書不在於比較或討論這兩種方法。本書的重點是以實作導向的方式學習 GraphQL。