GraphQL API with .NET 5 and Hot Chocolate

Les Jackson

In this step-by-step tutorial I take you through how build a GraphQL API using C#9, .NET 5 and the Hot Chocolate framework.

The video covers:

– Application Architecture Overview
– GraphQL theory and core concepts
– Building Queries
– Multi-threaded queries using Pooled DBContextFactory
– Sorting & Filtering
– Building Mutations
– Building Subscriptions (real-time event notifications with Web Sockets)

Level: Intermediate

📕 My Book: https://www.apress.com/gp/book/9781484262542
🤩 Patreon Site (Exclusive Member Benefits!): https://www.patreon.com/binarythistle
📕 Webhooks Course on Udemy: https://www.udemy.com/course/webhooks-with-dotnet-5/?referralCode=707A8D23F3533419E78F
💻 GitHub Repo: https://github.com/binarythistle/S04E01—.NET-5-GraphQL-API
🔗 WSL Install: https://docs.microsoft.com/en-us/windows/wsl/install-win10
🔗 Installing Docker in WSL: https://docs.docker.com/docker-for-windows/install-windows-home/
🔗 Visual Studio Code: https://code.visualstudio.com/download
🔗 SQL Server Express: https://www.microsoft.com/en-au/sql-server/sql-server-downloads
🔗 Visual Studio: https://visualstudio.microsoft.com/downloads/
🔗 Insomnia: https://insomnia.rest/
🔗 SQL Server on Docker: https://hub.docker.com/_/microsoft-mssql-server
🔗 SQL Server Management Studio: https://aka.ms/ssmsfullsetup
🔗 GraphQL Voyager: https://github.com/APIs-guru/graphql-voyager
🔗 GraphQL Official Site: https://graphql.org/
🔗 Chilli Cream / Hot Chocolate Site: https://chillicream.com/

⏲️ Time Codes ⏲️

PART 1 – INTRODUCTION
– 0:48 Welcome
– 2:38 Demo
– 11:10 Course Overview
– 14:03 Architecture
– 17:15 Ingredients

PART 2 – THEORY
– 19:26 What is GraphQL?
– 20:17 GraphQL Core Concepts
– 24:22 REST Vs GraphQL
– 31:22 GraphQL Frameworks in .NET

PART 3 – CODING PART 1
– 33:42 Environment Setup
– 38:44 Project Setup
– 47:58 Setup SQL Server with Docker
– 58:29 Configuration & Dependency Injection
– 1:10:41 Set up our 1st Model
– 1:14:20 Setup DB Context & Connection String
– 1:25:44 Migrate to DB
– 1:32:45 Create GraphQL Query
– 1:37:33 Configuring GraphQL Services (Startup Class)
– 1:38:54 Configuring GraphQL in Request Pipeline ()
– 1:40:03 Querying our endpoint with Banana Cake Pop & Insomnia
– 1:51:39 Setting up and using GraphQL Voyager
– 1:57:55 Concurrent quering issue
– 2:02:10 Introducing the Pooled DbContext Factory

PART 4 – CODING PART 2 – EXTENDING OUR QUERIES
– 2:06:49 Adding our 2nd Model
– 2:10:51 Update DBContext & Migrate
– 2:17:41 Querying with multi-model – using projection
– 2:24:40 Adding a Commands Query
– 2:28:44 Adding in-line documentation to our API
– 2:32:46 Annotation Vs Code First approaches
– 2:38:51 Adding a Platform Type with Resolver
– 2:51:08 Adding a Command Type with Resolver
– 3:00:11 Sorting & Filtering capabilities

PART 5 – CODING PART 3 – MUTATIONS & SUBSCRIPTIONS
– 3:07:05 Introducing Mutations & Adding Platforms
– 3:17:16 Testing our Platform Mutation
– 3:22:37 Adding a Commands Mutation
– 3:30:46 Testing our Commands Mutation
– 3:34:08 Adding Subscriptions (Real-time events)
– 3:43:01 Testing our Subscription

PART 6 – WRAP UP
– 3:45:23 Wrap up and Final thoughts
– 3:46:48 Patreon Supporter Credits