-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphql error: Unexpected token < in JSON at position 0 #20
Comments
Whoops yeah, you are right. Is it possible for you to switch to 7? I'll update the composer.json now. I suspect there might be other issues as I've been developing this in 7 for a while now. |
Yes, I updated PHP to version 7.1 and it is now working fine. I was just confused at first. Thanks. |
Glad to hear and thanks for reporting. Sorry for not having composer up to date. |
I resolved this issue by flushing the rewrite rules (Settings > Permalinks > Save). Turns out that the endpoint was just getting a 404 page until I flushed the rules. |
I am getting an error despite the activated plugin. The console reports a parse error which points to the usage of a PHP7 null coalescing operator (??):
Parse error</b>: syntax error, unexpected '?' in <b>/wordpress/web/app/plugins/graphql-wp/Type/Definition/WPPost.php
I am running a Docker container on PHP5.6. The graphql-wp repo's composer.json file requires php>=5.6. So, maybe it requires now PHP7. But, I am confused because no one has mentioned this anywhere.
The text was updated successfully, but these errors were encountered: