Permalink
Switch branches/tags
Nothing to show
Find file Copy path
db8c5c4 Nov 6, 2018
2 contributors

Users who have contributed to this file

@rwieruch @EmmanuelStalling
119 lines (99 sloc) 9.22 KB

+++ title = "The Road to GraphQL [Book]" description = "The free GraphQL book takes you on a journey to master GraphQL in JavaScript the pragmatic way with React, Node, and Apollo. Grab your free PDF, EPUB, or MOBI and get free updates for new releases. On the road to GraphQL you will learn how to build GraphQL server and client-side applications ..." date = "2018-11-05T13:50:46+02:00" tags = ["React", "GraphQL", "Apollo", "JavaScript", "Node"] categories = ["React", "GraphQL", "Apollo", "JavaScript", "Node"] keywords = ["graphql javascript book", "graphql book pdf", "book about graphql", "books on graphql", "learning graphql book", "graphql books", "graphql apollo book", "react graphql book", "graphql node book", "best graphql book"] news_keywords = ["graphql javascript book", "graphql book pdf", "book about graphql", "books on graphql", "learning graphql book", "graphql books", "graphql apollo book", "react graphql book", "graphql node book", "best graphql book"] hashtag = "#ReactJs #GraphQL" card = "img/posts/the-road-to-graphql-book/banner_640.jpg" banner = "img/posts/the-road-to-graphql-book/banner.jpg" contribute = "the-road-to-graphql-book.md" headline = "The Road to GraphQL [Book]"

summary = "The book about GraphQL is not intended to be used as a reference nor an in-depth guide about the internals of the GraphQL specification. Instead, it takes you on a journey learning GraphQL with JavaScript the pragmatic way by building client- and server-side applications. The book covers lots of facets about GraphQL in JavaScript which are important for building modern applications nowadays." +++

{{% sponsorship %}}

{{% pin_it_image "best graphql book" "img/posts/the-road-to-graphql-book/banner.jpg" "is-src-set" %}}

Today, I am super excited to announce the release of The Road to GraphQL - Your journey to master pragmatic GraphQL in JavaScript with React.js and Node.js. Writing this book proved to be a challenge with GraphQL technologies changing often, but I managed to get an updated version published in time to keep you ahead of the curve.

Perhaps the best thing about it the book is that I release it for free. I think everyone should have the chance to learn about GraphQL, as it will change how we think about client-server communication and data management in applications, so grab your copy of it as long as it is available for free. The second best thing about the book is that I self-published this book, which means it will be updated as often as possible, and that I can keep the PDF, EPUB, or MOBI versions in a state of constant improvement.

{{% package_box "The Road to GraphQL" "Your journey to master GraphQL in JavaScript the pragmatic way with React, Node and Apollo by building real world applications." "Get the Book" "img/page/the-road-to-graphql-book.png" "https://roadtoreact.com/course-details?courseId=THE_ROAD_TO_GRAPHQL" %}}

I wrote the The Road to GraphQL over the last year, while building several GraphQL applications for my clients and for myself. During this time, I came to understand the practical genius of GraphQL, and how it dramatically improves communication in client-server architectures. Not only does it improve the interface between the client and the server, it also enhances client-side state management by eliminating remote data management. Sophisticated GraphQL libraries like Apollo Client provide powerful features like caching, optimistic UI, and data prefetching for free. This book covers the fundamentals of GraphQL itself, as well as its ecosystem.

{{% chapter_header "What's in the book?" "graphql-book-content" %}}

The book comes with 350 pages, 45+ exercises, 400+ code snippets, 4 applications you are going to build along the way and various source code applications if you decide to buy the complete course. I applied the same principles as my other books:

  • Stay pragmatic
  • Keep it simple
  • Answer the why, not just the how
  • Experience a problem, solve a problem

This book is not intended to be an end-all reference for GraphQL APIs, nor an in-depth guide about the internals of the GraphQL specification. Instead, its purpose is to journey through learning GraphQL with JavaScript the pragmatic way, building client and server applications yourself. The book covers lots of facets about GraphQL in JavaScript that are important for building modern applications, without just throwing the libraries like Apollo at problems before experiencing them. It starts with the basic HTTP requests to perform GraphQL queries first, then moves on to using dedicated GraphQL libraries for it. You will even get the chance to implement your own GraphQL client library, so you understand how these libraries work under the hood. There are no hidden abstractions in this book, just plenty of fundamentals for JavaScript, React.js, Node.js, and GraphQL.

{{% sub_chapter_header "Client-side GraphQL with React" "graphql-book-client-react" %}}

The first part teaches how to build a GraphQL client application in React. Understanding React is a requirement before this book, so I recommend you take a look at my other free book called "The Road to learn React" if you need a good course. At some point, you will see the tedium in performing every GraphQL operation with basic HTTP requests. That's when we'll swap basic HTTP implementation for Apollo Client. While building your application with Apollo Client, you will learn more advanced features like caching, optimistic UI, and pagination with Apollo in React. In the end, you will have created a functional GraphQL client application.

{{% sub_chapter_header "Server-side GraphQL with Node" "graphql-book-client-node" %}}

The second larger block of the book continues with implementing your own GraphQL server application with Express.js and Apollo Server in Node.js. There you will not only learn about all the GraphQL server-side topics, but also how they can be applied in context in a real world server application which offers pagination, authentication, role- and permission-based authorization, batching, caching, subscriptions, and a SQL database. The GraphQL server topics are not only about GraphQL, but also about using GraphQL in context of other JavaScript technologies to build powerful real world applications with it. In the end, you will have a running GraphQL server project which has all the mentioned features and can be used to realize your own ideas on top of it.

{{% sub_chapter_header "Table of Contents" "toc" %}}

  • What is GraphQL?
    • GraphQL Advantages
    • GraphQL Disadvantages
    • Why not REST?
    • GraphQL Alternatives
  • Apollo
    • Apollo Advantages
    • Apollo Disadvantages
    • Apollo Alternatives for JavaScript, React and Node.js
  • GraphQL Setup, Tools and APIs
    • Feeding the API with Data on GitHub
    • Read/Write Data with GitHub’s Personal Access Token
    • Interacting with GitHub’s GraphQL API
  • GraphQL Fundamentals
    • GraphQL Operation: Query
    • GraphQL Operation: Mutation
    • GraphQL Pagination
  • React with GraphQL
    • Writing your first React GraphQL Client
    • GraphQL Query in React
    • GraphQL Pagination in React
    • GraphQL Mutation in React
    • Shortcomings of GraphQL in React without Apollo
  • Apollo Client
    • Starting with Apollo Boost on the Command Line
    • Apollo Client and a GraphQL Query
    • Apollo Client with Pagination, Variables, Nested Objects and List Fields
    • Apollo Client and a GraphQL Mutation
  • React with GraphQL and Apollo Client
    • Writing your first React with GraphQL and Apollo Client
    • Configure Apollo Client for React and GitHub’s GraphQL API
    • Connect Data-Layer to View-Layer: Introducing React Apollo
    • GraphQL Query with Apollo Client in React
    • Apollo Client Error Handling in React
    • GraphQL Mutation with Apollo Client in React
    • GraphQL Query/Mutation with Higher-Order Components in React
    • Local State Management with Apollo Client in React
    • Apollo Client Optimistic UI in React
    • GraphQL Pagination with Apollo Client
    • GraphQL Caching of Queries with Apollo Client
    • Implementing the Issues Feature: Setup
    • Implementing the Issues Feature: Client-Side Filter
    • Implementing the Issues Feature: Server-Side Filter
    • Apollo Client Prefetching
    • Exercise: Commenting Feature
    • Appendix: CSS Files and Styles
  • Node.js with GraphQL and Apollo Server
    • Apollo Server Setup with Express
    • Apollo Server: Type Definitions
    • Apollo Server: Resolvers
    • Apollo Server: Type Relationships
    • Apollo Server: Queries and Mutations
    • GraphQL Schema Stitching with Apollo Server
    • PostgreSQL with Sequelize for a GraphQL Server
    • Connecting Resolvers and Database
    • Apollo Server: Validation and Errors
    • Apollo Server: Authentication
    • Authorization with GraphQL and Apollo Server
    • GraphQL Custom Scalars in Apollo Server
    • Pagination in GraphQL with Apollo Server
    • GraphQL Subscriptions
    • Testing a GraphQL Server
    • Batching and Caching in GraphQL with Data Loader
    • GraphQL Server + PostgreSQL Deployment to Heroku

I look forward to extending this book with more technologies and features from the GraphQL specification. I hope "The Road to GraphQL" captures my enthusiasm for the topic, and that it becomes a valuable resource among other courses, tutorials, and books on pragmatic GraphQL programming. As always, feedback through any of the available platforms is welcome and encouraged!