We are performing requests using GraphQL queries by Apollo. When a query response is slow (+-10 seconds), the storefront will throw a socket timeout error. Example:
[VSF][error]: [Network error]: FetchError: request to https://test.environment.example/graphql?query=query+categoryList%7Bcategories%7Bitems%7Bchildren%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+children%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+children%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+__typename%7D__typename%7D__typename%7Dproduct_count+name+uid+__typename%7D__typename%7D%7D&operationName=categoryList&variables=%7B%7D failed, reason: Socket timeout
The socket timeout is a problem in local environments.
I am not able to see a global configuration setting in Vue storefront for changing the default socket timeout for all queries. Is there a way to do this?
2.7.1
Probably, you want to prepare an extension for your integration and use extendApp
in order to set custom timeout for the Express.js application. The links below should help you go through the process:
app
which is instance of Express.js app
in the extendApp
,Owner Name | vuestorefront |
Repo Name | vue-storefront |
Full Name | vuestorefront/vue-storefront |
Language | TypeScript |
Created Date | 2017-08-15 |
Updated Date | 2023-03-19 |
Star Count | 10081 |
Watcher Count | 278 |
Fork Count | 2032 |
Issue Count | 32 |
Issue Title | Created Date | Updated Date |
---|