A
Alokaiβ€’12mo ago
Darren R

GraphQL queries are using POST, should be GET

We have noticed that all our GraphQL queries are using POST, and not GET. We have the below default setting in our middleware.config.
customApolloHttpLinkOptions: {
useGETForQueries: true,
},
customApolloHttpLinkOptions: {
useGETForQueries: true,
},
We need the queries to use GET so that caching works. How do we resolve this? Version:
["@vue-storefront/magento-api": "2.4.1", "@vue-storefront/middleware": "2.8.0",]
["@vue-storefront/magento-api": "2.4.1", "@vue-storefront/middleware": "2.8.0",]
3 Replies
Darren R
Darren ROPβ€’12mo ago
I may be getting confused here. I'm looking at the network activity in the browser, where requests are getting sent via POST to /api/magento/... How can I verify the GraphQL queries that hit Magento are using GET
rohrig
rohrigβ€’12mo ago
Hi @Darren R πŸ‘‹ , I took a look at the change log here: https://docs.vuestorefront.io/middleware/reference/change-log#_350 and it appears that get support was added in version 3.5. Try upgrading.
Vue Storefront Docs
Change log
Frontend as a Service for Composable Commerce
skirianov
skirianovβ€’12mo ago
Hey @Darren R , initially all the GraphQL queries were indeed using POST request. Not so long back we added the option to use GET requests, please check the link @rohrig sent you πŸ™‚
Want results from more Discord servers?
Add your server