Error: Unable to find GraphQL endpoint. While trying to generate post type object

Error: Unable to find GraphQL endpoint. While trying to generate post type object


0

Im trying to setup a headless WP project using faustjs, WPgraphQL and ACF. Later im planning to also implement Shopify shopfront API. I was setting up the project, installing all the plugins and setting them up. So i have setup my .env.local and i have setup the faust settings in the WP admin panel.

After adding some custom fields and adding content that i could fetch, i tried to generate a post types object using "npm run generate", but after running the command i get this error.

error – Unable to find a GraphQL endpoint at https://localhost:10039/index.php?graphql
error – WPGraphQL may not be active, or your WordPress site is unavailable.

I have looked this error up but i can’t find a solution for it.

I tried different ways in starting such project as described above. First i tried to use the Atlas: Headless WP plugin and using a Shopify Blueprint. Everything went well until i tried to run "npm run dev". After that i got the same error.

I also tried a tutorial. I used all the code supplied in the video, but when i tried opening the site that was running localy, i got an Apollo error: failed to fetch.

After troubleshooting for some time nothing worked, so i decided to try a different tutorial (Current project) and that’s where i ran into the problem with the "npm run generate" command.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *