pageballoon / headstart

Decoupled GraphQL-driven content management using OctoberCMS
https://octobercms.com/plugin/nocio-headstart
MIT License
7 stars 2 forks source link

Subdirectory installation should be reflected in /graphql endpoint url #1

Closed luciandinu closed 4 years ago

luciandinu commented 4 years ago

I've tested this with your templates... The idea is that is not clear on how to use it. Pointing to /graphql url result in an error file_get_contents(/....../october/composer.json): failed to open stream: No such file or directory

frthjf commented 4 years ago

Hi @luciandinu, Thanks for checking out my plugin. What query are you sending to the /graphql endpoint? In the 'Test' section, can you send the query

{
headstart
}

? It should return 1 or True.

luciandinu commented 4 years ago

Helllo, { headstart } It returns: TypeError: Failed to fetch

frthjf commented 4 years ago

What October and PHP version are you using?

luciandinu commented 4 years ago

I have PHP 7.0 + October build 458. Ok. I think I know the problem. I have october in a subfolder like : https://domainame.com/october/ and the plugin tries to access https://domainname.com/graphql .. but this url doesn't exists

frthjf commented 4 years ago

I see, that's a bug then; it should use the installation url. I'll fix this in the next version, thanks for reporting. However, the next version of Headstart will require PHP 7.3 or higher as it comes with the latest Lighthouse GraphQL backend. I'll release an update this weekend, watch this space.

frthjf commented 4 years ago

This has now been fixed. Please upgrade to the latest Headstart version 1.2.1 and let me know if you encounter any other issues. Thanks.