I used this query to fetch all product from my store:
query MyQuery { products(first: 1000) { nodes { id image { sourceUrl } name onSale productCategories { nodes { slug } } productTags { nodes { slug } } sku status totalSales type visibleProducts { nodes { slug isRestricted } } ... on VariableProduct { manageStock onSale price(format: RAW) regularPrice(format: RAW) salePrice(format: RAW) soldIndividually weight width } ... on ExternalProduct { onSale price(format: RAW) regularPrice(format: RAW) salePrice(format: RAW) } ... on SimpleProduct { price(format: RAW) regularPrice(format: RAW) salePrice(format: RAW) virtual weight width } } } }
But, I received the error:
ApolloError: Response not successful: Received status code 500 at new ApolloError (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/errors/errors.cjs.js:31:28) at /Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/core/core.cjs.js:1490:19 at /Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/utilities/utilities.cjs.js:958:69 at new Promise (<anonymous>) at Object.error (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/utilities/utilities.cjs.js:958:21) at notifySubscription (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:140:18) at onNotify (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:179:3) at SubscriptionObserver.error (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:240:7) at /Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/utilities/utilities.cjs.js:946:68 at Array.forEach (<anonymous>) at iterateObserversSafely (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/utilities/utilities.cjs.js:946:25) at Object.error (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/utilities/utilities.cjs.js:1031:21) at notifySubscription (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:140:18) at onNotify (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:179:3) at SubscriptionObserver.error (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:240:7) at Object.error (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/zen-observable/lib/Observable.js:330:22) { graphQLErrors: [], networkError: Error [ServerError]: Response not successful: Received status code 500 at Object.throwServerError (/Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/link/utils/utils.cjs.js:45:17) at /Volumes/DATA/OwnCode/viet-healthy-dn/node_modules/@apollo/client/link/http/http.cjs.js:32:19 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) { response: Response { size: 0, timeout: 0, [Symbol(Body internals)]: [Object], [Symbol(Response internals)]: [Object] }, statusCode: 500, result: { code: 'internal_server_error', message: '<p>There has been a critical error on this website.</p><p><a href="https://wordpress.org/support/article/debugging-in-wordpress/">Learn more about debugging in WordPress.</a></p>', data: [Object], additional_errors: [] } }, extraInfo: undefined }
It's look like any limit are here? I don't know. How can I solved this issue?
I just wanna fetch all products (about only 154 items) for SSG. I dont want pagination here.