1. What is GraphQL

프론트엔드 2019. 12. 26. 15:36
반응형

§ This post is written for personal study purposes § § This post may include contents from Learning GraphQL : Declarative Data Fetching for Modern Web Apps §

What is GraphQL

GraphQL is a query language for APIs. It is typically served over HTTP. GraphQL queries ask for only the things they need and the server returns those queried rather than returning fields that are programmed.

Typically with REST, when the client needs different set of data, you either need to make a new endpoint for that specific need or return a huge sized data that can serve different purposes. However, with GraphQL, client is able to query only the data that it needs(Underfetching).

Design Principles of GraphQL

  1. Hierarchical : Fields are nested and query is shaped like the data it returns.
  2. Product Centric : GraphQL is driven by the data needs of the client.
  3. Strong Typing : Each data point has specific type and is validated.
  4. Client-specific queries
  5. Introspective : queries
반응형

'프론트엔드' 카테고리의 다른 글

6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
3. GraphQL Fragments  (0) 2019.12.26
2. GraphQL Query  (0) 2019.12.26
블로그 이미지

개발자_무형

,