I am trying to use GraphQL playground in the test environment using Sitecore 10.1 with JSS 18. It works like a charm on local with the same configuration (both local & test have Standalone role), however when I try to run any query on test it does not work.
I try to access the endpoint url + /ui?sc_apikey={mykey} in the browser, the same URL is used in the playground URL. When I run a query
{
item(path: "/sitecore/templates") {
id
path
children {
name
}
template {
fields {
name
}
}
}
}
In the result window I see:
{
"error": "Unexpected token < in JSON at position 0"
}
and this happens for any query. When I checked the logs I see the below:
[HttpException]: A public action method 'ui' was not found on controller Sitecore.Services.GraphQL.Hosting.Mvc.GraphQLController.
at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)
at System.Web.Mvc.Controller.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at Sitecore.Mvc.Routing.RouteHttpHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
So I am quite confused now because it says that the "UI" method does not exist, but with exactly the same query I am able to make things work on my local but not on test. Additionally I tried to remove the "/ui" from the playground URL and I'm just getting timeouts with no errors so it is quite hard to track.
What else should I verify to find the cause?