Fullstack GraphQL
Minimum price
Suggested price

Fullstack GraphQL

About the Book

Overwhelmed by all the tools required for building GraphQL applications? Learn how every piece fits together

What you'll build

You will build from scratch a Pinterest clone called PinApp. Every chapter will slowly teach you the different moving parts of a GraphQL stack by adding features to the example project.

Focus on learning, not on environment setup. Every chapter contains live, editable code samples.

The first chapter will teach you how to read and write data from PinApp, like fetching users or pins, using the GraphQL query language.

Queries and mutations example

The second chapter will teach you how to design PinApp's data model using the GraphQL schema design language.

Schema example

In the third chapter you will learn how to create PinApp's GraphQL APIs using Apollo Server. You will expose to HTTP the schema you designed in the previous chapter. You will also learn how to connect an API with a Postgres database, and how to organize the API source code.

Server example

SQLite3 example

Email authentication example

File management example

The fourth chapter teaches you how to build PinApp's frontend using Apollo Client 2.0 and React 16.

React example

Client side state example

Apollo client example

React apollo example

In the fifth chapter you will learn how to add real time features to PinApp using GraphQL Subscriptions.

Postgres example

Server side subscriptions example

Apollo boost migration example

Client side subscriptions example

The sixth chapter will teach you how to test PinApp's API and frontend using Jest.

Server side testing example

Client side testing example

  • Share this book

  • Categories

    • React
    • API Design
    • APIs
    • Node.js
    • Computers and Programming
    • JavaScript
  • Feedback

    Email the Author(s)

About the Author

Julián Mayorga
Julián Mayorga

Hi there! I have been a full stack Javascript developer since 2013. I have worked in a wide range of tech companies, from a payment startup to a digital car inspections company.

Building beautiful frontends and APIs is my passion. When I say beautiful, I mean both external as internal. Nowadays I am totally obsessed over GraphQL and React. Using them I feel like I can create lovely, maintainable products. I write about building apps using this stack at http://graphql.college.

Table of Contents

    • So, what is GraphQL?
    • Organization of the book
    • Sample application
    • Development environment
  • 1. Reading and writing data
    • 1.1 Queries and Mutations
    • 1.2 Query
    • 1.3 Nested Fields
    • 1.4 Multiple fields
    • 1.5 Operation name
    • 1.6 Arguments
    • 1.7 Aliases
    • 1.8 Fragments
    • 1.9 Variables
    • 1.10 Directives
    • 1.11 Default variables
    • 1.12 Inline fragments
    • 1.13 Meta fields
    • 1.14 Mutations
    • 1.15 Summary
  • 2. Data modeling
    • 2.1 Schema, types and resolvers
    • 2.2 Schemas
    • 2.3 Type definitions
    • 2.4 Resolvers
    • 2.5 Summary
  • 3. GraphQL APIs
    • 3.1 Server
    • 3.2 Database
    • 3.3 Authentication
    • 3.4 File organization
    • 3.5 Summary
  • 4. GraphQL clients
    • 4.1 Initial React client
    • 4.2 Client side state
    • 4.3 Apollo Client
    • 4.4 React Apollo
    • 4.5 Query component
    • 4.6 Apollo Provider
    • 4.7 Mutation component
    • 4.5 Summary
  • 5. Subscriptions
    • 5.1 Server side subscriptions
    • 5.2 PubSub systems
    • 5.3 Implementing server side Subscriptions
    • 5.4 Client side subscriptions
    • 5.5 Apollo boost migration
    • 5.6 Implementing client side subscriptions
    • 5.7 Summary
  • 6. Testing
    • 6.1 How to test GraphQL APIs
    • 6.2 Testing setup
    • 6.3 GraphQL layer
    • 6.4 HTTP Layer
    • 6.5 Testing email based authentication
    • 6.6 Subscription endpoints
    • 6.7 How to test React Apollo GraphQL clients
    • 6.8 Testing client-side authentication
    • 6.9 Client subscriptions
    • 6.9 Summary

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub