If you're using headless approach with react based application above approach works.If you want to host it in AEM, React SPA is the go-to solution Other way if you want to use graphQL API's within AEM, here's the thread - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-form...