File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,19 +6,25 @@ The `ErrorResponse` object passed to the `disable` and `retry` callback options
66
77
88``` diff
9- // The following also applies to the retry function since it has the same signature
9+ // The following also applies to the ` retry` function since it has the same signature
1010createPersistedQueryLink({
11- disable: (errorResponse) => {
12- - if (errorResponse.graphQLErrors) {
13- + if (CombinedGraphQLErrors.is(errorResponse.error)) {
11+ - disable: ({ graphQLErrors, networkError }) => {
12+ + disable: ({ error }) => {
13+ - if (graphQLErrors) {
14+ + if (CombinedGraphQLErrors.is(error)) {
1415 // ... handle GraphQL errors
1516 }
1617
17- - if (errorResponse.networkError) {
18- + if (errorResponse.error) {
19- // ... handle a NetworkError errors
18+ - if (networkError) {
19+ + if (error) {
20+ // ... handle link errors
21+ }
22+
23+ // optionally check for a specific kind of error
24+ - if (networkError) {
25+ + if (ServerError.is(error)) {
26+ // ... handle a server error
2027 }
21- }
2228});
2329```
2430
You can’t perform that action at this time.
0 commit comments