Skip to content

Commit 688d37a

Browse files
committed
Grammar
1 parent 74a9300 commit 688d37a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/source/migrating/apollo-client-4-migration.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,9 +1449,9 @@ async function onUserInteraction() {
14491449
14501450
The promise returned from the `execute` function is now consistently resolved or rejected depending on the configured `errorPolicy`. With an `errorPolicy` of `none`, the promise always rejects on error. With an `errorPolicy` of `all`, the promise always resolves and sets the `error` property on the result. With an `errorPolicy` of `ignore`, the promise always resolves and discards any errors.
14511451
1452-
Previously, Apollo Client 3 resolved the promise when GraphQL errors were returned when using an `errorPolicy` of `none`. Network errors always caused the promise to reject, regardless of the configured error policy. This change unified the error behavior across error types to ensure errors are handled consistently.
1452+
Previously, Apollo Client 3 resolved the promise when GraphQL errors were returned when using an `errorPolicy` of `none`. Network errors always caused the promise to reject, regardless of the configured error policy. This change unifies the error behavior across error types to ensure errors are handled consistently.
14531453
1454-
To migrate code that uses an `errorPolicy` of `none`, wrap the call to `execute` in a `try`/`catch` block and use `CombinedGraphQLErrors.is(error)` to test if the error was the result of GraphQL errors.
1454+
To migrate code that uses an `errorPolicy` of `none`, wrap the call to `execute` in a `try`/`catch` block and use `CombinedGraphQLErrors.is(error)` to check for GraphQL errors.
14551455
14561456
```ts disableCopy=true
14571457
const [execute] = useLazyQuery(QUERY, {
@@ -1474,7 +1474,7 @@ async function onUserInteraction() {
14741474
}
14751475
```
14761476
1477-
To migrate code that uses an `errorPolicy` of `all`, read the error from the `error` property returned in the result. You can optionally remove any `try`/`catch` statements since the promise resolves for all error types.
1477+
To migrate code that uses an `errorPolicy` of `all`, read the error from the `error` property returned in the result. You can optionally remove any `try`/`catch` statements because the promise resolves for all error types.
14781478
14791479
```ts disableCopy=true
14801480
const [execute] = useLazyQuery(QUERY, {

0 commit comments

Comments
 (0)