A
Alokaikantro

magentoRestAPI in next-sdk

Hi, I would like to ask about next-sdk-magento or nuxt-sdk-magento. We have all these available queries of GraphQL (picture) which we can consume in our application with the below code (as an example):
useQuery(['products'], () => sdk.magento.products({}), {
refetchOnMount: false,
refetchOnWindowFocus: false,
});
useQuery(['products'], () => sdk.magento.products({}), {
refetchOnMount: false,
refetchOnWindowFocus: false,
});
The question is if there is a default proper way to consume magentoRestAPIs. More specifically how could I have a POST request on this url {{magento_base_url}}/rest/V1/custom/an-api-i-made #🙋|general-help #next #sdk
No description
kantro
kantro•27d ago
@rohrig any suggestion?
skirianov
skirianov•26d ago
hey, is the question about how to send POST request or specifically REST API requests? Our Magento integration is based on GraphQL, but you can create a custom method in the middleware to send REST API requests