Book description
Reduce bandwidth demands on your APIs by getting only the results you need—all in a single request! The GraphQL query language simplifies interactions with web servers, enabling smarter API queries that can hugely improve the efficiency of data requests. In GraphQL in Action, you'll learn how to bring those benefits to your own APIs, giving your clients the power to ask for exactly what they need from your server, no more, no less. Practical and example-driven, this book teaches everything you need to get started with GraphQL—from design principles and syntax right through to performance optimization.About the Technology
GraphQL APIs are fast, efficient, and easy to maintain. They reduce app latency and server cost while boosting developer productivity. This powerful query layer offers precise control over API requests and returns, making apps faster and less prone to error.
About the Book
GraphQL in Action gives you the tools to get comfortable with the GraphQL language, build and optimize a data API service, and use it in a front-end client application. By working through set up, security, and error handling you'll learn to create a complete GraphQL server. You'll also unlock easy ways to incorporate GraphQL into your existing codebase so you can build simple, scalable data APIs.
What's Inside
- Define a GraphQL schema for relational and document databases
- Implement GraphQL types using both the schema language and object constructor methods
- Optimize GraphQL resolvers with data caching and batching
- Design GraphQL fragments that match UI components' data requirements
- Consume GraphQL API queries, mutations, and subscriptions with and without a GraphQL client library
About the Reader
For web developers familiar with client-server applications.
About the Author
Samer Buna has over 20 years of experience in software development including front-ends, back-ends, API design, and scalability.
Quotes
With thorough explorations of GraphQL concepts and numerous practical examples, this excellent book will quickly take you from novice to expert.
- Dary Merckens, Gunner Technology
A great introduction to GraphQL. This was the first book where I finally ‘got it’.
- Jeremy Lange, G2
Learn the new API paradigm with this excellent practical guide.
- Isaac Wong, Privé Technologies
If you want to develop an API with best practices, GraphQL is for you, and this book can help you get started quickly.
- Ethien Daniel Salinas Domínguez, Intelligential.tech
Table of contents
- GraphQL in Action
- inside front cover
- Copyright
- dedication
- brief contents
- contents
- front matter
- Part 1. Exploring GraphQL
- 1 Introduction to GraphQL
- 2 Exploring GraphQL APIs
- 3 Customizing and organizing GraphQL operations
- Part 2. Building GraphQL APIs
-
4 Designing a GraphQL schema
- 4.1 Why AZdev?
- 4.2 The API requirements for AZdev
-
4.3 Queries
- 4.3.1 Listing the latest Task records
- 4.3.2 Search and the union/interface types
- 4.3.3 Using an interface type
- 4.3.4 The page for one Task record
- 4.3.5 Entity relationships
- 4.3.6 The ENUM type
- 4.3.7 List of scalar values
- 4.3.8 The page for a user’s Task records
- 4.3.9 Authentication and authorization
- 4.4 Mutations
- 4.5 Subscriptions
- 4.6 Full schema text
- 4.7 Designing database models
- Summary
- 5 Implementing schema resolvers
- 6 Working with database models and relations
- 7 Optimizing data fetching
- 8 Implementing mutations
- Part 3. Using GraphQL APIs
- 9 Using GraphQL APIs without a client library
- 10 Using GraphQL APIs with Apollo client
- index
- inside back cover
Product information
- Title: GraphQL in Action
- Author(s):
- Release date: March 2021
- Publisher(s): Manning Publications
- ISBN: 9781617295683
You might also like
book
Building Event-Driven Microservices
Organizations today often struggle to balance business requirements with ever-increasing volumes of data. Additionally, the demand …
book
gRPC: Up and Running
Get a comprehensive understanding of gRPC fundamentals through real-world examples. With this practical guide, you’ll learn …
book
Redis in Action
Redis in Action introduces Redis and walks you through examples that demonstrate how to use it …
book
Terraform in Action
Use Terraform to programmatically create, test, and manage infrastructure using the efficient infrastructure-as-code approach. In Terraform …