Skip to content

Commit e1f553e

Browse files
committed
Update changeset
1 parent 173f1dd commit e1f553e

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

.changeset/sharp-glasses-sneeze.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff 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
1010
createPersistedQueryLink({
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

0 commit comments

Comments
 (0)