GraphQL in Action, Video Edition

GraphQL in Action, Video Edition

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 66 Lessons (9h 21m) | 3.04 GB

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

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.

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.

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
Table of Contents

1 GraphQL is a service
2 GraphQL is a specification
3 GraphQL problems
4 Introduction to GraphQL
5 REST APIs and GraphQL APIs in action
6 The big picture
7 What about REST APIs
8 Why GraphQL
9 Apollo Server
10 Implementing and using GraphQL subscriptions
11 Including authentication headers
12 Making a mutation request
13 Managing local app state
14 Using Apollo hook functions
15 Using GraphQL APIs with Apollo client
16 Using the automatic cache
17 Examples from the GitHub API
18 Exploring GraphQL APIs
19 The basics of the GraphQL language
20 Customizing and organizing GraphQL operations
21 Fragments and UI components
22 GraphQL fragments
23 Inline fragments for interfaces and unions
24 Ordering records returned by a list field
25 Renaming fields with aliases
26 Variables and input values
27 Creating a Task object
28 Designing a GraphQL schema
29 Designing database models
30 List of scalar values
31 Mutations
32 Queries
33 The core types
34 The TaskApproach models
35 Using an interface type
36 Building a schema using constructor objects
37 Communicating over HTTP
38 Creating resolver functions
39 Custom object types
40 Generating SDL text from object-based schemas
41 Implementing schema resolvers
42 Setting up the GraphQL runtime
43 Resolving a one-to-one relation
44 Resolving relations
45 Separating interactions with PostgreSQL
46 The taskMainList query
47 Transforming field names
48 Working with database models and relations
49 Defining and using a DataLoader instance
50 Optimizing data fetching
51 Single resource fields
52 Using DataLoader with custom IDs for caching
53 Using DataLoader with MongoDB
54 Implementing mutations
55 The approachVote mutation
56 The me root query field
57 The userLogin mutation
58 Authenticating GraphQL requests
59 Making Ajax requests
60 Performing GraphQL mutation requests
61 Performing GraphQL query requests
62 Performing query requests scoped for a user
63 Using GraphQL APIs without a client library
64 Part 1. Exploring GraphQL
65 Part 2. Building GraphQL APIs
66 Part 3. Using GraphQL APIs