AlokaiA
Alokai2y ago
2 replies
kantro

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,
  });


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
image.png
Was this page helpful?