Closed Jones-S closed 5 years ago
@Jones-S you need a config/craftql.php
file with something like:
<?php
return [
'graphiqlFetchUrl' => 'yourdomain.com',
'allowedOrigins' => [
'*'
]
];
Hey thank you @timkelty for your super fast response.
Just found out about that. The reason why it did not work the first time I tried, was because the $DEFAULT_SITE_URL
was formatted like this:
DEFAULT_SITE_URL="http://localdomain.test"
instead of
DEFAULT_SITE_URL="http://localdomain.test/"
.
This caused this error:
So I had to change the the DEFAULT_SITE_URL... 🤷♂️. thanks anyway
Hi there
I read this https://github.com/markhuot/craftql/pull/135 PR, where @timkelty needed different
siteUrl
andgraphqlUrl
. This is exactly what I need, but I don't know how to set it.Could someone tell me how to actually use this new setting? Sorry I am still new to craft and I don't always understand how things work...
Do I just have to add
graphiqlFetchUrl
inside my general config php file? (I tried it did not work).I see that this is within the settings model:
public $graphiqlFetchUrl = null; // defaults to siteUrl via CpController
But I don't know how to override.
Thank you for some help.
cheers