Загрузка страницы

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
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
28 октября 2020 г. 17:40:50
00:45:20
Яндекс.Метрика