Graphql Bootcamp

Tags: Node.Js

Learn how to build GraphQL applications using Node.js. Includes Prisma v1, authentication, Apollo Client, and more!

Last updated 2022-01-10 | 4.5

- Learn and master GraphQL by building real-world Node applications.
- Use Prisma v1 to store and access data from a production database.
- Use Apollo Client to communicate with GraphQL from your web app.

What you'll learn

Learn and master GraphQL by building real-world Node applications.
Use Prisma v1 to store and access data from a production database.
Use Apollo Client to communicate with GraphQL from your web app.
Learn how to deploy and test your GraphQL applications.
Test your skills and gain confidence by completing more than 80 coding challenges.
Get access to a free 110-page PDF guide with lecture notes
code samples
and documentation links.

* Requirements

* Development: A basic understanding of Node and JavaScript is required.
* Hardware: A computer with an internet connection (Windows
* macOS
* or Ubuntu).

Description

Do you want to learn GraphQL and keep your Node.js skills up-to-date and relevant?

GraphQL is quickly changing how Node.js developers write their APIs and backend applications. It offers a much-needed replacement to the traditional REST HTTP API. It’s by far the most exciting change we’ve seen to Node.js development in a long time. Goodbye Express. Hello GraphQL.

Who should learn GraphQL? Anyone building backend applications with Node.js!

In this class, you’ll learn how to use GraphQL to replace the standard Express HTTP API, as well as support features like authentication, real-time applications, and more. GraphQL can be used with any client that has internet access, whether it’s a web app, mobile app, or server-side application.

Big and small companies, from Twitter and Facebook to Yelp and Twitch, are switching from frameworks like Express to GraphQL.

I designed this class to give you the skills and real-world experience needed to build and launch your own GraphQL apps.

To kick the class off, we’ll answer a few important questions. What is GraphQL? Why is it useful? How is GraphQL going to help me build better applications with Node.js?

Next, you’ll master the fundamentals of GraphQL by building out a blogging application. You’ll learn about GraphQL schemas, data types, queries, mutations, subscriptions, and many other fantastic GraphQL features.

From there, you’ll set up advanced features like authentication, database storage, production deployment, automated test suites, and more.

Throughout the course you’ll learn how to:

  1. Model your application data using schemas

  2. Create queries and subscriptions allowing clients to access data in the database

  3. Create mutations allowing clients to create and change data in the database

  4. Query and change your data from the browser by making requests with Apollo Client

  5. Work with the Prisma ORM (v1) to communicate with your database via a GraphQL API

  6. Deploy your GraphQL applications to production

  7. Secure your application data with an authentication system

  8. Write an automated test suite for your application

Learn GraphQL by Writing Code

This course was designed to be interactive, with more than 80 challenges along the way to get you writing code and solving problems on your own. This will give you the real-world skills and experience needed to write GraphQL applications once you’re done with the class.

Everything you need comes in one easy-to-use package.

There’s no need to worry whether you’re learning the right skills to land that GraphQL job or launch that GraphQL app. I’ve mapped out everything you need to know in an interactive, easy-to-follow package designed to get you up and running in a couple of weeks.

Get access to fast support if you get stuck.

There’s nothing worse than getting stuck ten hours into a course and not getting the help you need to continue. Getting stuck is part of the learning process. That’s why I’m here to answer every single question.

I guarantee this is the most up-to-date and engaging GraphQL course available, and it comes with a Udemy 30-day money-back guarantee.

The first videos are available as a free preview, so I’ll see you inside the class!

- Andrew Mead

Who this course is for:

  • This course is for anyone who wants to learn how to build advanced Node applications.
  • This course is for anyone interested in keeping their Node skills up-to-date.

Course content

11 sections • 118 lectures

Welcome to the Class! Preview 05:27

Grab the PDF Guide Preview 01:07

Why GraphQL? Preview 13:08

Installing Node.js and VSC Preview 03:15

Section Intro: GraphQL Basics: Schemas and Queries Preview 00:30

In this section, you’ll learn how to work with arrays in GraphQL. This lesson covers arrays where the array elements are scalar values such as string, numbers, or booleans.

What is a Graph? Preview 06:10

In this lesson, you’re going to learn how to think in graphs. This will set us up to work with a GraphQL API in the next lesson.

GraphQL Queries Preview 13:29

In this video, you’re going to make your very first GraphQL query. Queries are used to fetch data from a GraphQL API.

Nested GraphQL Queries Preview 12:18

Setting up Babel Preview 11:28

In this lesson, you’re going to set up Babel. This will allow you to take advantage of all the latest JavaScript features such as the ES6 import/export syntax.

ES6 Import/Export Preview 16:20

In this video, you’re going to learn about JavaScript modules. JavaScript modules make it easy to share code between files, allowing us to create more advanced applications without messy code.

Creating Your Own GraphQL API Preview 17:32

In this lesson, you’re going to set up your very own GraphQL API!

GraphQL Scalar Types Preview 13:15

In this lesson, you’re going to learn about the five scalar types supported by GraphQL.

Live Reload for GraphQL-Yoga Preview 04:43

In this lesson, you’re going to set up nodemon with Node and Babel. Nodemon will automatically restart your server after you make any changes, allowing you to speed up development.

Creating Custom Types Preview 14:50

In this lesson, you’ll be creating your first custom object types. This will allow you to model your application data and represent it in the application schema.

Operation Arguments Preview 13:40

In this lesson, you’re going to explore operation arguments. This allows you to pass data from the client to the GraphQL server.

Working with Arrays: Part I Preview 10:49

In this lesson, you’ll learn how to work with arrays in GraphQL. This lesson covers arrays where the array elements are scalar values such as string, numbers, or booleans.

Working with Arrays: Part II Preview 22:18

In this lesson, you’re going to continue learning about arrays. Specifically, you’ll learn how to work with arrays of objects, such as an array of posts or an array of users.

Relational Data: Basics Preview 14:57

In this lesson, you’ll start to explore relational data in GraphQL. Setting up relationships between your object types allows you to query based on those relationships, which is one of the best features of GraphQL.

Relational Data: Arrays Preview 06:23

In this lesson, you’ll continue exploring relational data in GraphQL by setting up an array-based association.

Comment Challenge: Part I Preview 06:27

In this lesson, you’re going to start a three-part challenge series designed to test and reinforce what you’ve learned so far in the course.

Comment Challenge: Part II Preview 08:41

In this lesson, you’re going to continue implementing comments by setting up associations between the comment and the post.

Comment Challenge: Part III Preview 12:43

In this lesson, you’re going to wrap up this challenge series by setting up associations between the comment and the user.

Section Intro: GraphQL Basics: Mutations Preview 00:39

In this section, you’ll be exploring GraphQL mutations. Mutations let you create, update, and delete data using GraphQL. By the end of this section, you’ll have everything you need to perform all the CRUD operations (create, read, update, delete).

Creating Data with Mutations: Part I Preview 17:33

In this lesson, you’ll create and execute your very first mutation. This will allow clients to perform operations like signing up a new user or creating a new post.

Creating Data with Mutations: Part II Preview 20:28

In this lesson, you’ll continue to explore mutations. You’ll set up mutations for types that have required associations with other types.

The Object Spread Operator with Node.js Preview 06:44

In this lesson, you’ll be configuring babel to support the object spread operator. You’ll also learn why this operator is useful and how it can be used to clean up our resolver methods.

The Input Type Preview 13:17

In this lesson, you’re going to learn about the input type. This allows you to set up arguments as objects, giving you more control over how your operations function.

Deleting Data with Mutations: Part I Preview 16:34

In this lesson, you’ll learn how to use mutations to remove data from a GraphQL back-end.

Deleting Data with Mutations: Part II Preview 13:22

In this lesson, it’s going to be up to you to create mutations for deleting posts and comments.

A Pro GraphQL Project Structure: Part I Preview 17:21

In this lesson, you’re going to start refactoring your application’s architecture. The goal is to break up index.js into smaller files that are easier to manage and easier to scale.

A Pro GraphQL Project Structure: Part II Preview 08:33

In this lesson, you’ll wrap up refactoring the application by splitting the application resolvers up across several smaller files.

Updating Data with Mutations: Part I Preview 11:51

Updating Data with Mutations: Part II Preview 15:50

In this lesson, it’s up to you to create mutations for updating posts and comments.

Section Intro: GraphQL Basics: Subscriptions Preview 01:13

In this section, you’ll be exploring GraphQL subscriptions. Subscriptions give clients a way to subscribe to data changes and get notified by the server when data changes. Subscriptions make it possible to create real-time applications where the client renders data changes in real-time.

GraphQL Subscription Basics Preview 15:24

In this lesson, you’ll create your first subscription. The goal here is to explore the basic syntax used for subscriptions and actually get some real-time data sent from the server to the client.

Setting up a Comments Subscription Preview 10:32

In this lesson, you’ll be creating a GraphQL subscription for the blogging application. The subscription will allow clients to subscribe to new comments added on a given post. That would allow the front-end, whether it’s a mobile app or website, to render new comments to the visitors in real-time.

Setting up a Posts Subscription Preview 07:47

In this lesson, it’s your job to create a subscription that allows clients to be notified when new posts are created.

Expanding the Posts Subscription for Edits and Deletions Preview 19:38

In this lesson, you’ll be expanding the post subscription. The server currently notifies subscribers when posts are created. This is a good start, but the server should also notify clients when posts are updated or deleted. This will allow the client to keep the UI completely up to date.

Expanding the Comments Subscription for Edits and Deletions Preview 09:55

In this lesson, it’s going to be up to you to expand the comments subscription. The goal is to notify subscribers when comments are created, updated, or deleted.

Enums Preview 08:50

In this lesson, you’re going to learn about enums (enumerations) in GraphQL.

Section Intro: Database Storage with Prisma Preview 01:14

In this section, you’ll be integrating Prisma into your GraphQL project. Prisma is a GraphQL specific ORM (Object Relational Mapping) that makes it easy to integrate data storage into your GraphQL applications.

What is Prisma? Preview 08:43

In this lesson, you’ll learn exactly what Prisma is and where it fits into your application’s architecture.

Prisma Mac Setup Preview 13:04

In this lesson, you’ll be setting up your Mac to work with Prisma. There are a few tools and dependencies you’ll need before it can be used.

Prisma Windows Setup Preview 15:28

In this lesson, you’ll be setting up your Windows machine to work with Prisma. There are a few tools and dependencies you’ll need before it can be used   

Prisma Ubuntu Setup Preview 16:49

In this lesson, you’ll be setting up your Linux machine to work with Prisma. There are a few tools and dependencies you’ll need before it can be used.

Prisma 101 Preview 17:16

In this lesson, you’ll be creating and running your first Prisma service using the tools set up in the previous videos.

Exploring the Prisma GraphQL API Preview 12:54

In this video, you’re going to explore the GraphQL API that’s provided by Prisma.   

Add Post type to Prisma Preview 17:54

In this lesson, you’ll learn how to customize your Prisma data model and how to push those changes to the Prisma service.

Adding Comment Type to Prisma Preview 11:39

In this lesson, it’s going to be up to you to integrate comments into the Prisma project.

Integrating Prisma into a Node.js Project Preview 17:12

In this lesson, you’ll learn how to communicate with the Prisma GraphQL API from Node.js. That will allow you to read and write to the database right from Node.js itself.

Using Prisma Bindings Preview 13:20

In this lesson, you’ll be exploring how to perform queries using the bindings you just configured. This will allow you to fetch data out of the database.

Mutations with Prisma Bindings Preview 15:04

In this lesson, you’ll learn how to preform mutations using Prisma bindings. This will allow you to create, update, and delete data right from Node.js.

Using Async/Await with Prisma Bindings Preview 17:34

In this lesson, you’ll learn how to use async/await with the bindings provided by Prisma. Integrating async/await will simplify your asynchronous code, making it easier to read, write, and maintain.

Checking If Data Exists Using Prisma Bindings Preview 15:19

In this lesson, you’ll learn how to check if a given record exists using the bindings provided by Prisma. This will enable checks such as checking if a given user exists with a specific email address.

Customizing Type Relationships Preview 13:08

In this lesson, you’ll learn how to customize the relationships between types. This gives you fine grain control over what happens to related data when a given record gets removed.

Modeling a Review System with Prisma: Set Up Preview 10:33

In this challenge video, it’ll be up to you to model a review website using what you’ve learned about GraphQL and Prisma.

Modeling a Review System with Prisma: Solution Preview 16:49

In this challenge solution, you’ll go over the steps necessary to create a Prisma application for a review website.

Section Intro: Authentication with GraphQL Preview 01:15

In this section, you’ll learn how to create an authentication system using GraphQL. This will allow users to sign up and login to the application with an email and password. You’ll also learn how to limit access to your GraphQL API based on authentication.

Adding Prisma into GraphQL Queries Preview 15:43

In this lesson, you’ll start to integrate Prisma into your Node.js GraphQL API. The goal here is to set up the Node.js application as the middleman between the client and Prisma, allowing you to lock down your data with authentication.

Integrating Operation Arguments Preview 14:17

In this lesson, you’ll learn how to take operation arguments provided to the Node.js API and pass them through to the Prisma API. This will allow you to set up filtering, sorting, and pagination.

Refactoring Custom Type Resolvers Preview 09:13

In this lesson, you’ll explore how Prisma makes it unnecessary to set up custom type resolvers for associated data.

Adding Prisma into GraphQL Mutations Preview 14:07

In this lesson, you’ll start integrating Prisma into the mutations for your Node.js GraphQL API. This is similar to what you’ve already done for your application queries.

Adding Prisma into GraphQL Update Mutations: Part I Preview 13:26

In this lesson, it’s up to you to continue integrating Prisma into the Node.js application.

Adding Prisma into GraphQL Update Mutations: Part II Preview 16:25

In this lesson, it’s up to you to continue integrating Prisma into the Node.js application.

Adding Prisma into GraphQL Subscriptions Preview 19:12

In this lesson, you’ll learn how to set up your subscriptions to work with Prisma. The good news is that you’ll be able to vastly simplify your application code.

Closing Prisma to the Outside World Preview 08:06

In this lesson, you’ll learn how to lock down access to the Prisma API. Right now, the Prisma API is open to the public, allowing anyone to read and write from the database without needing to authenticate. That’s a problem.

Allowing for Generated Schemas Preview 08:30

In this lesson, you’ll make a small update to ensure that you can still fetch the generated schema from Prisma, even though Prisma is not protected by the secret.

Storing Passwords Preview 11:26

In this lesson, you’ll start adding password support into the application. The goal here is to require a password when someone signs up for the application.

Creating Auth Tokens with JSON Web Tokens Preview 20:19

In this lesson, you’re going to learn about JSON Web Tokens. JSON Web Tokens, also known as JWTs, provide you with a secure way to create authentication tokens for your application.

Logging in Existing Users Preview 16:12

In this lesson, it’ll be up to you to create a new mutation that allows users to log in to the application.

Validating Auth Tokens Preview 16:28

In this lesson, you’ll learn how to validate an authentication token.

Locking Down Mutations (Users) Preview 13:22

In this video, you’ll start locking down your mutations. This will ensure the client is authenticated before any data in the database is created, updated, or deleted.

Locking Down Mutations (Posts and Comments) Preview 15:41

In this lesson, it’ll be up to you to lock down the other application mutations.

Locking Down Queries: Part I Preview 19:19

With your mutations behind authentication, in this video, you’ll learn how to lock down your application queries.

Locking Down Queries: Part II Preview 09:33

In this video, you’ll continue to lock down your application queries.

Locking Down Individual Type Fields Preview 11:26

In this lesson, you’ll learn how to hide an individual field behind authentication. This will give you a way to hide user email address from the public.

Fragments Preview 18:47

In this lesson, you’ll learn about GraphQL fragments. Fragments give you a reusable way to define a selection set. No longer will you have to list out all the fields for a user, post, or comment every time you define your selection sets.

Cleaning up Some Edge Cases Preview 10:47

In this lesson, it’ll be up to you to clean up a few edge cases in the application.

Locking Down Subscriptions Preview 10:13

In this lesson, you’ll learn how to put your subscriptions behind authentication.

Token Expiration Preview 11:19

In this lesson, you’ll learn how to expire JSON Web Tokens after a specific period of time.

Password Updates Preview 08:34

In this video, you’ll allow users to update their passwords.

Section Intro: Pagination and Sorting with GraphQL Preview 01:18

In this section, you’ll learn how to paginate and sort your GraphQL data. This will give more options to clients so they can request just the data they need, in the order they want it in.

Pagination Preview 11:05

In this lesson, you’ll learn how to integrate pagination into your GraphQL queries. This will allow clients to fetch a limited number of posts, such as the first 20, with the ability to fetch the next set of 20 when they need them.

Pagination Using Cursors Preview 09:45

In this lesson, you’ll learn how to set up pagination using cursors. This is an alternative way to specify which records should be fetched.

Working with createdAt and updatedAt Preview 10:19

In this lesson, you’ll learn how to work with createdAt and updatedAt. These timestamps keep track of when a given record was created and when it was last updated.

Sorting Data Preview 16:27

In this lesson, you’ll learn how to sort data with GraphQL and Prisma. This will allow clients to fetch data sorted in a way that’s useful to them. For example, blog posts on the home page should probably be sorted with the newest posts first.

Section Intro: Production Deployment Preview 00:44

In this section, you’ll be deploying your app to production. By the end, you’ll have a live GraphQL API that can be accessed by anyone with an internet connection.

Creating a Prisma Service Preview 14:23

In this lesson, you’ll set up your production database and production Prisma server using Prisma Cloud. Prisma Cloud makes it simple to deploy and manage your Prisma application.

Prisma Configuration and Deployment Preview 11:09

In this lesson, you’ll deploy your Prisma project to the production server you created in the last lesson.

Exploring the Production Prisma Instance Preview 06:06

In this lesson, you’ll explore the production Prisma service you deployed in the last one.

Node.js Production App Deployment: Part I Preview 13:38

In this lesson, you’ll start getting the Node.js application ready for deployment. There are a few changes that need to be made before Heroku will be able to run the app.

Node.js Production App Deployment: Part II Preview 18:40

In this lesson, you’ll be wrapping up the deployment of the Node.js application. By the end, your GraphQL API will be deployed live to the web.

Node.js Production Environment Variables Preview 18:14

In this lesson, you’ll be pulling passwords and secrets out of the code base and into environment variables.


Section Intro: Apollo Client and Testing GraphQL Preview 01:00

In this section, you’ll be setting up an automated test suite for GraphQL. You’ll also learn how to use Apollo Client to send off GraphQL operations from Node.js and client-side JavaScript.

Setting up a Test Environment Preview 03:53

In this lesson, you’ll be setting up a Prisma test environment. This will create a separate space in the database for test data. This will ensure that our test cases can’t mess up our development or production data.

Installing and Exploring Jest Preview 11:20

In this lesson, you’ll be setting up a testing environment using Jest. Jest is a test framework that gives you everything you need to build out your test cases. Unlike other test frameworks, Jest also ships with an assertion library, making it simple to get started.

Testing and Assertions Preview 20:48

In this lesson, you’ll be writing your first test cases for real JavaScript functions.

Apollo Client in the Browser: Part I Preview 06:58

In this lesson, you’ll learn how to use Parcel to get a web app up and running quickly. Parcel comes with a module system and Babel support baked right in, so it couldn’t be easier to get started.

Apollo Client in the Browser: Part II Preview 17:03

In this lesson, you’ll learn how to use Apollo Client to fire off GraphQL operations from the browser. That’ll give you everything you need to build out a web-based client for your application.

Configuring Jest to Start the GraphQL Server Preview 14:49

In this lesson, you’ll be setting up Jest to start and stop the GraphQL server. This will ensure you can continue to use a single command to run your test suite.

Testing Mutations Preview 13:06

In this lesson, you’ll write your first test case that tests the GraphQL application. This will allow your test suite to fire off GraphQL operations and then assert something about the response from the server.

Seeding the Database with Test Data Preview 11:34

In this lesson, you’ll learn how to set up the test database with dummy data. This is useful for testing functionality like the ability to login, which will require an existing user to be stored in the database.

Testing Queries Preview 08:46

In this lesson, you’ll learn how to write test cases for GraphQL queries. This is now possible because you have test data in the database to actually query.

Expecting GraphQL Operations to Fail Preview 12:11

In this lesson, you’ll learn how to use Jest to expect an operation to fail. This is useful for a lot of situations, including testing that new users can’t sign up for an account with an email that’s already in use.

Supporting Multiple Test Suites and Authentication Preview 13:03

In this lesson, you’ll be doing a bit of refactoring to break the test cases out into more than one file.

Testing with Authentication: Part I Preview 17:32

In this lesson, you’ll learn how to test GraphQL operations that require authentication. This will let you write tests that ensure logged-in users are able to access their data and manipulate it.

Testing with Authentication: Part II Preview 17:40

In this lesson, you’ll continue to test GraphQL operations that require authentication.

GraphQL Variables: Part I Preview 18:33

In this lesson, you’re going to learn about variables in GraphQL. Variables provide a better way to set up dynamic values in your operations.

GraphQL Variables: Part II Preview 09:27

In this lesson, it’ll be up to you to use GraphQL variables in your application.

Testing Comments Preview 19:05

In this lesson, it’ll be up to you to use what you learned to create some comment test data and write a couple of tests for comments.

Testing Subscriptions Preview 22:51

In this lesson, you’ll learn how to test GraphQL subscriptions. It’s the last operation to explore testing for.

Test Case Ideas Preview 03:08

In this lesson, it’ll be up to you to use what you learned to create some comment test data and write a couple of tests for comments.

Section Intro: Creating a Boilerplate Project Preview 01:12

Creating a Boilerplate Project Preview 16:46

In this lesson, you’ll be duplicating the blogging app and pulling out everything specific to blogging. That’ll leave you with a boilerplate GraphQL app with GraphQL, Prisma, and authentication all built-in.

Using the Boilerplate Project Preview 10:25

In this lesson, you’ll learn how to get started with the boilerplate project. You’ll learn how to set it up for the development, test, and production environments.

Section Intro: Wrapping Up Preview 00:46

In this section, you'll explore an app you can now build with your new GraphQL skills. I'll also make some suggestions regarding what to learn next.

A New App Idea Preview 05:04

Bonus: Where Do I Go from Here? Preview 03:13