01:40Web Wednesday: TypeScript and GraphQL with Aaron Powell
From the creator
One of the nice things with GraphQL for API design is that it enforces type-safety in the schema that we define. But alas, these types are embedded as part of our schema and that type safety is lost for our resolvers, resolver variables, consuming clients and so on, requiring us to recreate the type system. It’d be so much easier if we could leverage our schema type system in our application. This sounds like a job for type generation, but how do we do that? We’ll take a look at a tool that can generate you TypeScript type definitions, then implement our backend using them before looking at how they can plug into the front end with React (or Angular or Vue or Svelte or whatever is the framework of the month!). We’ll cap off by learning how to model our storage platform effectively, using a separate type system for storage and combine them with the GraphQL schema types, producing a rich, strongly types, end-to-end development model. 5:20 What is GraphQL? 7:00 Comparing GraphQL to REST 8:35 Introducing a GraphQL query 14:07 When should we not use GraphQL? 17:30 Exploring the sample 19:30 Adding an Azure Function to serve GraphQL 23:15 Adding Apollo Server 28:00 Exploring a GraphQL schema 30:15 GraphQL resolvers 34:55 Querying the updated model 35:40 The rationale for TypeScript with GraphQL 36:40 Caching data with GraphQL 38:00 Generating a GraphQL schema and TypeScript types 40:45 Using GraphQL Code Generator 49:00 Using contexts and data sources 55:40 Using GraphQL from a
Published 2022-01-31 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.
Keep exploring Learn to Code
01:40
19:55Announcing General Availability of Azure Bot Service and Language Understanding service
Microsoft Developer
57:29
09:02
18:59
12:24How to provisioning IoT devices at scale with IoT Hub Device Provisioning Service
Microsoft Developer
14:41TWC9: Connect(); On-Demand, Dev’s Guide to Azure, Future Workspace, Furby Hacking and more...
Microsoft Developer