Handling Errors with Apollo Client (React)
In this video I talk about handling errors when running queries and mutations using Apollo Client in a React project.
Table of contents:
00:00 Introducing the project that I use for examples
01:54 Handling errors in a GraphQL query
02:20 Handling a network error in a GraphQL query
05:14 Different kinds of errors reported by Apollo Client (graphqlErrors and networkError)
10:04 Handling GraphQL errors when running a query
13:36 The "errorPolicy" option
16:21 Reading the graphqlErrors array
19:51 Handling errors in GraphQL mutations
20:56 Unhandled runtime error
25:02 Validating form input on the server (Apollo Server's predefined error classes, UserInputError)
27:25 Apollo Server predefined errors: UserInputError
28:30 Parsing the graphqlErrors array and rendering the validation errors
37:36 Processing all query and mutation errors with Apollo Link Error
Code:
https://github.com/d-dmytro/youtube-handling-errors-with-apollo-client
Apollo Server: Error Handling
https://www.apollographql.com/docs/apollo-server/data/errors/
Error Link
https://www.apollographql.com/docs/react/api/link/apollo-link-error/
👨💻 My Udemy Course:
Using TypeScript with React
https://www.udemy.com/course/react-with-typescript/?referralCode=1816455EA4C12F9CA9F4
Видео Handling Errors with Apollo Client (React) канала Dmytro Danylov
Table of contents:
00:00 Introducing the project that I use for examples
01:54 Handling errors in a GraphQL query
02:20 Handling a network error in a GraphQL query
05:14 Different kinds of errors reported by Apollo Client (graphqlErrors and networkError)
10:04 Handling GraphQL errors when running a query
13:36 The "errorPolicy" option
16:21 Reading the graphqlErrors array
19:51 Handling errors in GraphQL mutations
20:56 Unhandled runtime error
25:02 Validating form input on the server (Apollo Server's predefined error classes, UserInputError)
27:25 Apollo Server predefined errors: UserInputError
28:30 Parsing the graphqlErrors array and rendering the validation errors
37:36 Processing all query and mutation errors with Apollo Link Error
Code:
https://github.com/d-dmytro/youtube-handling-errors-with-apollo-client
Apollo Server: Error Handling
https://www.apollographql.com/docs/apollo-server/data/errors/
Error Link
https://www.apollographql.com/docs/react/api/link/apollo-link-error/
👨💻 My Udemy Course:
Using TypeScript with React
https://www.udemy.com/course/react-with-typescript/?referralCode=1816455EA4C12F9CA9F4
Видео Handling Errors with Apollo Client (React) канала Dmytro Danylov
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Introduction to Node.js | Node.js CourseIndexed Access Types (Lookup Types) in TypeScript (plus keyof and generics)Conditional Types - Advanced TypeScriptUtility Types - Advanced TypeScriptNext.js Crash Course - SSG, SSR, API Routes, and moreMapped Types - Advanced TypeScriptTypeScript: Type CompatibilityGenerating TypeScript Types for GraphQL Schema, Queries and Mutations Using GraphQL Code GeneratorDeploying a Next.js App to VercelInstalling Node.js (LTS or Current, NVM) | Node.js Course