Hello
For 3 Days, my project which worked perfectly locally, once put on the production server.
GraphQl requests are a failure with the error "[Error: Network error: JSON Parse error: Unrecognized token '<']" and after log analysis it is a 404 error because the route was not found.
After investigation via the GraphQl Atlair client for chrome by changing the method to GET to make my GrasphQl requests, the error everything works.
my question is how to work the POST method?
### EDIT
the stack Error complete
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "An error occurred",
"status": 404,
"detail": "No route found for "POST /overblog/graphql"",
"class": "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",
"trace": [
{
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/http-kernel/EventListener/RouterListener.php",
"line": 136,
"args": []
},
{
"namespace": "Symfony\Component\HttpKernel\EventListener",
"short_class": "RouterListener",
"class": "Symfony\Component\HttpKernel\EventListener\RouterListener",
"type": "->",
"function": "onKernelRequest",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/event-dispatcher/Debug/WrappedListener.php",
"line": 126,
"args": [
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
],
[
"string",
"kernel.request"
],
[
"object",
"Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher"
]
]
},
{
"namespace": "Symfony\Component\EventDispatcher\Debug",
"short_class": "WrappedListener",
"class": "Symfony\Component\EventDispatcher\Debug\WrappedListener",
"type": "->",
"function": "__invoke",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 264,
"args": [
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
],
[
"string",
"kernel.request"
],
[
"object",
"Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher"
]
]
},
{
"namespace": "Symfony\Component\EventDispatcher",
"short_class": "EventDispatcher",
"class": "Symfony\Component\EventDispatcher\EventDispatcher",
"type": "->",
"function": "doDispatch",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 239,
"args": [
[
"array",
[
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
]
]
],
[
"string",
"kernel.request"
],
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
]
]
},
{
"namespace": "Symfony\Component\EventDispatcher",
"short_class": "EventDispatcher",
"class": "Symfony\Component\EventDispatcher\EventDispatcher",
"type": "->",
"function": "callListeners",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 73,
"args": [
[
"array",
[
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
],
[
"object",
"Symfony\Component\EventDispatcher\Debug\WrappedListener"
]
]
],
[
"string",
"kernel.request"
],
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
]
]
},
{
"namespace": "Symfony\Component\EventDispatcher",
"short_class": "EventDispatcher",
"class": "Symfony\Component\EventDispatcher\EventDispatcher",
"type": "->",
"function": "dispatch",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php",
"line": 168,
"args": [
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
],
[
"string",
"kernel.request"
]
]
},
{
"namespace": "Symfony\Component\EventDispatcher\Debug",
"short_class": "TraceableEventDispatcher",
"class": "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher",
"type": "->",
"function": "dispatch",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/http-kernel/HttpKernel.php",
"line": 122,
"args": [
[
"object",
"Symfony\Component\HttpKernel\Event\RequestEvent"
],
[
"string",
"kernel.request"
]
]
},
{
"namespace": "Symfony\Component\HttpKernel",
"short_class": "HttpKernel",
"class": "Symfony\Component\HttpKernel\HttpKernel",
"type": "->",
"function": "handleRaw",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/http-kernel/HttpKernel.php",
"line": 68,
"args": [
[
"object",
"Symfony\Component\HttpFoundation\Request"
],
[
"integer",
1
]
]
},
{
"namespace": "Symfony\Component\HttpKernel",
"short_class": "HttpKernel",
"class": "Symfony\Component\HttpKernel\HttpKernel",
"type": "->",
"function": "handle",
"file": "/home/foongon/website/yamo-mobile-backend/vendor/symfony/http-kernel/Kernel.php",
"line": 201,
"args": [
[
"object",
"Symfony\Component\HttpFoundation\Request"
],
[
"integer",
1
],
[
"boolean",
true
]
]
},
{
"namespace": "Symfony\Component\HttpKernel",
"short_class": "Kernel",
"class": "Symfony\Component\HttpKernel\Kernel",
"type": "->",
"function": "handle",
"file": "/home/foongon/website/yamo-mobile-backend/public/index.php",
"line": 25,
"args": [
[
"object",
"Symfony\Component\HttpFoundation\Request"
]
]
}
]
}
the route endpoint with the POST (/overblog/graphql) method refuses to work but with the GET method all is Okay. I don't know how to solve this problem
I really need to use the METHOD POST for mutations
Thanks everyone
Very cordially