Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Preface
Acknowledgments
Conventions Used in This Book
Using Code Examples
O’Reilly Safari
How to Contact Us
1. Welcome to GraphQL
What Is GraphQL?
The GraphQL Specification
Design Principles of GraphQL
Origins of GraphQL
History of Data Transport
Remote Procedure Call
Simple Object Access Protocol
REST
REST Drawbacks
Overfetching
Underfetching
Managing REST Endpoints
GraphQL in the Real World
GraphQL Clients
2. Graph Theory
Graph Theory Vocabulary
History of Graph Theory
Trees are Graphs
Graphs in the Real World
3. The GraphQL Query Language
GraphQL API Tools
GraphiQL
GraphQL Playground
Public GraphQL APIs
The GraphQL Query
Edges and Connections
Fragments
Union types
Interfaces
Mutations
Using Query Variables
Subscriptions
Introspection
Abstract Syntax Trees
4. Designing a Schema
Defining Types
Types
Scalar Types
Enums
Connections and Lists
One-to-One Connections
One-to-Many Connections
Many-to-Many Connections
Through types
Lists of Different Types
Union types
Interfaces
Arguments
Filtering Data
Data paging
Sorting
Mutations
Input Types
Return Types
Subscriptions
Schema Documentation
5. Creating a GraphQL API
Project Setup
Resolvers
Root Resolvers
Type Resolvers
Using Inputs and Enums
Edges and Connections
One-to-many connections
Many-to-many
Custom Scalars
apollo-server-express
Context
Installing Mongo
Adding Database to Context
GitHub Authorization
Setting Up GitHub OAuth
The Authorization Process
githubAuth Mutation
Authenticating Users
me Query
postPhoto mutation
Add fake users mutation
Conclusion
6. GraphQL Clients
Using a GraphQL API
fetch Requests
graphql-request
Apollo Client
Apollo Client with React
Project Setup
Configure Apollo Client
The Query Component
The Mutation Component
Authorization
Authorizing the User
Identifying the User
Working with the Cache
Fetch Policies
Persisting The Cache
Updating the Cache
7. GraphQL in the Real World
Subscriptions
Working with Subscriptions
Posting photos
Consuming Subscriptions
Adding the WebSocketLink
Listening for new users
Uploading Files
Handling Uploads on the Server
Posting a New Photo with Apollo Client
Security
Request Timeouts
Data Limitations
Limiting Query Depth
Limiting Query Complexity
Apollo Engine
Taking the Next Steps
Incremental Migration
Schema-First Development
GraphQL Events
Community
Community Slack Channels
Index
← Prev
Back
Next →
← Prev
Back
Next →