Commit 86746a8 1 parent 1408c87 commit 86746a8 Copy full SHA for 86746a8
File tree 2 files changed +9
-2
lines changed
packages/api-client/src/helpers/magentoLink
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @vue-storefront/magento-api " : minor
3
+ ---
4
+
5
+ ** [ CHANGED] ** - increase the HttpAgent socket timeout from ` 10s ` to ` 30s ` to prevent timeout errors on slow connections.
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ import possibleTypes from "../../types/possibleTypes.json";
11
11
import standardURL from "../url/standardURL" ;
12
12
13
13
const { HttpsAgent } = AgentKeepAlive ;
14
- const agent = new HttpsAgent ( ) ;
14
+ const agent = new HttpsAgent ( {
15
+ timeout : 30000 ,
16
+ } ) ;
15
17
16
18
const createErrorHandler = ( ) =>
17
19
onError ( ( { graphQLErrors, networkError } ) => {
@@ -48,7 +50,7 @@ export const apolloLinkFactory = (
48
50
) => {
49
51
const baseLink =
50
52
handlers ?. apolloLink ||
51
- setContext ( ( apolloReq , { headers } ) => ( {
53
+ setContext ( ( _apolloReq , { headers } ) => ( {
52
54
headers : {
53
55
...headers ,
54
56
} ,
You can’t perform that action at this time.
0 commit comments