/
Preface
Introduction
Who is this book for?
Background
The book
The chapters
The code
Git
Formatting
Resources
Version
Background
JavaScript
JavaScript
JSON
Git
Node, npm, and nvm
HTTP
Server
Databases
MongoDB
Redis
SQL
SPA
SSR
React
Vue
Mobile apps
Android
iOS
React Native
Latency
CDN
Webhooks
Testing
Mocking
Types of tests
Continuous integration
Authentication
Tokens vs. sessions
localStorage vs. cookies
Browser performance
Chapter 1: Understanding GraphQL Through REST
Introduction
GraphQL as an alternative to a REST API
A simple REST API server
A simple GraphQL server
Querying a set of data
Filtering the data
Async data loading
Multiple types of data
Security and error handling
Tying this all together
Part I: The Spec
Chapter 2: Query Language
Operations
Document
Selection sets
Fields
Arguments
Variables
Field aliases
Fragments
Named fragments
Type conditions
Inline fragments
Directives
@skip
@include
@deprecated
Mutations
Subscriptions
Summary
Chapter 3: Type System
Schema
Types
Descriptions
Scalars
Enums
Objects
Interfaces
Unions
Lists
Non-null
Field arguments
Input objects
Directives
Extending
Introspection
Summary
Chapter 4: Validation & Execution
Validation
Execution
Resolvers
Response format
Errors
Part II: The Client
Chapter 5: Client Dev
Anywhere: HTTP
cURL
JavaScript
Client libraries
Streamlined request function
Typing
View layer integration
Caching
DevTools
Chapter 6: React
Setting up
Build options
App structure
Set up Apollo
Querying
First query
Loading
Polling
Subscriptions
Lists
Query variables
Skipping queries
Authentication
Logging in
Resetting
Mutating
First mutation
Listing reviews
Optimistic updates
Arbitrary updates
Creating reviews
Using fragments
Deleting
Error handling
Editing reviews
Advanced querying
Paginating
Offset-based
page
skip & limit
Cursors
after
orderBy
Client-side ordering & filtering
Local state
Reactive variables
In cache
REST
Review subscriptions
Subscription component
Add new reviews
Update on edit and delete
Prefetching
On mouseover
Cache redirects
Batching
Persisting
Multiple endpoints
Extended topics
Linting
Setting up linting
Fixing linting errors
Using linting
Editor integration
Pre-commit hook
Continuous integration
Uploading files
Testing
Server-side rendering
Chapter 7: Vue
Setting up Apollo
Querying
Querying with variables
Further topics
Advanced querying
Mutating
Subscriptions
Chapter 8: React Native
App structure
Adding Apollo
Adding a screen
Persisting
Deploying
Chapter 9: iOS
Chapter 10: Android
Setting up Apollo Android
First query
Querying with variables
Caching
ViewModel
Flow
Part III: The Server
Chapter 11: Server Dev
Introduction
Why build a GraphQL server?
What kind of GraphQL server should I build?
Building
Project setup
Types and resolvers
Authentication
Data sources
Setting up
File structure
Creating reviews
Custom scalars
Creating users
Protecting with secret key
Setting user context
Linking users to reviews
Authorization
Errors
Nullability
Union errors
formatError
Logging errors
Masking errors
Error checking
Custom errors
Subscriptions
githubStars
reviewCreated
Testing
Static testing
Review integration tests
Code coverage
User integration tests
Unit tests
End-to-end tests
Production
Deployment
Options
Deploying
Environment variables
Database hosting
MongoDB hosting
Redis hosting
Redis PubSub
Redis caching
Querying in production
Analytics
Error reporting
More data sources
SQL
SQL setup
SQL data source
SQL testing
SQL performance
REST
GraphQL
Custom data source
Extended topics
Mocking
Pagination
Offset-based
Cursors
after an ID
Relay cursor connections
File uploads
Client-side
Server-side
Schema validation
Apollo federation
Hasura
Schema design
One schema
User-centric
Easy to understand
Easy to use
Mutations
Arguments
Payloads
Versioning
Custom schema directives
@tshirt
@upper
@auth
Subscriptions in depth
Server architecture
Subscription design
Security
Auth options
Authentication
Authorization
Denial of service
Performance
Data fetching
Caching
Future
Part IV: Extras
Server-Side Rendering
Setting up the server
Adding React
Adding Apollo
Apollo Federation
Federated service
Federated gateway
Extending entities
Managed federation
Deploying federation
Server Analytics
Stripe and Service Integrations
Making a query
Writing server-side code
Creating persisted queries
Preventing DoS Attacks
Edit on GitHub
Next
Preface
Core
Apollo Basics
Apollo Client
React / JS
iOS
Android
Backend
Apollo Server
Apollo Federation
Tools
Apollo Studio