Building real-time applications with Blazor and GraphQL
summary
A working Blazor WebAssembly chat app uses Hot Chocolate on the server and a Strawberry Shake client on the front end, generating a strongly typed C# API from .graphql files; queries, mutations and a subscription stream (async enumerable over WebSockets) deliver real-time messages that arrive in the browser. Code reuses HttpClientFactory, DI and fragments to eliminate magic strings so GraphQL fragments -> C# types becomes concrete. The demo runs end to end and successfully sends and receives messages.
AI-written summary · about
chapters (16)
- 0:00Start
- 0:55What Graphql Is
- 1:41Graphql Query
- 10:26State of Blazer
- 10:57Web Assembly
- 13:08Demo Code
- 16:19Fetch Data with Graphql
- 16:58Initialize Our Project
- 18:05Graphql Queries
- 22:53Loading Indicator
- 29:52Component Structure
- 31:03Second Demo
- 36:52Send Messages
- 37:59Define a Real-Time Subscription
- 44:30Real-Time Logic
- 47:29Does It Use Json as a Format for Messages between Client and Server
related talks
24mHow to Create a Full-Stack Web App Using Blazor WASM and GraphQL
01h 05mCreating a GraphQL API with ASP.NET Core
01h 10mHotChocolate: An Introduction to GraphQL for ASP.NET Core
01h 01mBlazor, a new framework for browser-based .NET apps
58mHot Chocolate: An introduction to GraphQL on ASP.Net Core
25mConsuming GraphQL using C#
01h 03mBlazor in more depth
01h 03mBlazor & gRPC - Code-first .NET SPA developer productivity
