반응형
§ 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
반응형
'프론트엔드' 카테고리의 다른 글
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 |