Explore all newline lessons
lesson
How to Type Data from GraphQL With TypeScript GenericsTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQLAlthough the custom server fetch() function we've established in the last lesson works, the data being returned isn't appropriately typed. In this lesson, we'll take advantage of TypeScript generics to ensure we get queried data from our server fetch() function with the appropriate type.