Getting Started: GraphQL in .NET

Get started with GraphQL in .NET using C#

About This Course

Created at Facebook in 2012 and released as open-source software in 2015, GraphQL has proven that it is here to stay. GraphQL is one of the "Big Three" when it comes to building modern APIs (alongside REST and gRPC), and it is the approach of choice for many big companies like GitHub, Shopify and thousands more. GraphQL solves many problems that developers encounter when building traditional REST APIs, and it does it with fashion, sporting an elegant read and write approach as well as a unique way to subscribe to data changes. In this 7-and-a-half-hour course, Michael Staib, a GraphQL steering committee member and creator of the popular GraphQL library HotChocolate, will assume you have no knowledge on this topic and take you to a very decent level where you'll be able to build GraphQL .NET applications using C#.

Course Curriculum

7h 28m 10 sections
Welcome
01:38 Free preview
What will you learn in this course?
02:07 Free preview
Who is the course for and prerequisites
00:59 Free preview
Why GraphQL?
06:06
Lets have a look at GraphQL
06:30
GraphQL operation structure explained
03:15
A quick look at the GraphQL transport protocols
07:24
Lets create our first GraphQL server!
05:03
The annotation-based schema building approach
01:49
An exploration of the GraphQL type system
01:27
GraphQL Object Types
03:07
GraphQL Interface Types
04:10
GraphQL Union Types
02:57
GraphQL Enum Type
03:54
GraphQL Input Objects
01:56
GraphQL OneOf Inputs
02:29
Getting Started with Entity Framework
09:36
Using GraphQL projections with Entity Framework
03:28
Field Middleware Explained
09:06
Paging in GraphQL
13:09
Filtering
12:52
Filtering and Sorting
12:08
Exploring Schema Building Approaches
11:00
Introduction
01:20
Building with Type Modules and automatic type registration
06:10
Splitting Root Types
02:40
Cursor Pagination in a layered architectures
09:24
Using type extensions in Hot Chocolate
05:30
Introduction to DataLoader
14:50
Using DataLoader with nested Paging
10:46
Introduction to GraphQL query patterns
09:11
The Entity pattern
09:16
Working with composite keys
14:58
Exposing internal identifiers
00:44
GraphQL Errors and Non-Nullability explained
05:43
Throwing Custom GraphQL Errors
05:12
Using Domain Errors in GraphQL Queries
11:07
Introduction to GraphQL mutations
05:09
Implementing a basic mutation
06:12
Mutation design principals
08:12
Mutation conventions
04:58
Error patterns for GraphQL mutations
15:26
Implementing Patch Mutations
05:23
Handling File Uploads with GraphQL
13:22
Introduction to GraphQL subscriptions
05:53
Implementing a basic subscription
13:02
Implementing a basic chat
14:29
Keeping state with replayable events
17:31
Longruninng Mutations
11:25
Introduction
03:19
Schema as an artifact
09:43
Schema export CLI
04:19
What is a GraphQL schema registry?
01:31
Setting up the schema registry
10:39
Setting up a CI build with the schema registry
07:17
Setting up a deployment build with the schema registry
09:53
Setting up a client registry
14:46
Introduction
00:56
Setting up aspire for developer telemetry
05:57
Adding Hot Chocolate Telemetry
06:12
Add Production Telemetry
14:01
Instrumentation Options
01:46
Custom Spans
03:25

Meet Your Instructor

Michael Staib

Michael Staib

Michael is a member of the GraphQL technical steering committee, contributing to the GraphQL composite schema specification under the GraphQL Foundation. He is a Microsoft MVP and the author of the Hot Chocolate GraphQL Server for .NET. Michael frequently speaks at conferences and trains professionals in the .NET and GraphQL ecosystems, sharing his expertise and passion for these technologies.

View all courses by Michael Staib

What's New

Getting Started: Building .NET Applications on AWS
course

Getting Started: Building .NET Applications on AWS

Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

Learn More
What's new in C# 14
blog

What's new in C# 14

This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

Learn More
Let's Build It: AI Chatbot with RAG in .NET Using Your Data
course

Let's Build It: AI Chatbot with RAG in .NET Using Your Data

Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

Learn More
From Zero to Hero: SignalR in .NET
course

From Zero to Hero: SignalR in .NET

Enable enterprise-grade real-time communication for your web apps with SignalR.

Learn More
Deep Dive: Solution Architecture
course

Deep Dive: Solution Architecture

Master solution architecture and turn business needs into scalable, maintainable systems.

Learn More
Migrating: ASP.NET Web APIs to ASP.NET Core
course

Migrating: ASP.NET Web APIs to ASP.NET Core

A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

Learn More
Getting Started: Caching in .NET
course

Getting Started: Caching in .NET

Let's make the hardest thing in programming easy for .NET software engineers.

Learn More
From Zero to Hero: Testing with xUnit in C#
course

From Zero to Hero: Testing with xUnit in C#

Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

Learn More
Create a ChatGPT Console AI Chatbot in C#
blog

Create a ChatGPT Console AI Chatbot in C#

This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

Learn More