1. WHAT IS GRAPHQL
§ 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
- Hierarchical : Fields are nested and query is shaped like the data it returns.
- Product Centric : GraphQL is driven by the data needs of the client.
- Strong Typing : Each data point has specific type and is validated.
- Client-specific queries
- Introspective : queries
댓글
댓글 쓰기