Closed alexkey89 closed 1 year ago
@alexkey89 What's your WooGraphQL version
@alexkey89 What's your WooGraphQL version @kidunot89 WooGraphQL is 0.15 & WPGraphQL is 1.14.10
Any other WPGraphQL extensions?
And is debug mode on?
And is debug mode on?
@kidunot89 Yes debug mode is on and i have the following extensions:
WPGraphQL WPGraphQL CORS Select WPGraphQL for Advanced Custom Fields WPGraphQL for Rank Math SEO WPGraphQL JWT Authentication WPGraphQL WooCommerce (WooGraphQL)
ps: even if i deactivate all of them except WPGraphQL and WPGraphQL WooCommerce issue persists.
@alexkey89 Is your setup a Bedrock or Composer setup?
@alexkey89 Is your setup a Bedrock or Composer setup?
@kidunot89 no
If you go directly to the endpoint at /graphql
do you get an error message?
If you go directly to the endpoint at
/graphql
do you get an error message?
@kidunot89 When I try to POST a graphql request or if i simply POST without any variables via postman, i get internal server error issue. When i go to /graphql i get this error: {"errors":[{"message":"GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId\""
Is this a live server with some kind of caching in place or your local environment?
Is this a live server with some kind of caching in place or your local environment?
@kidunot89 It's on a live server. older versions of woographql do not have this issue. Just to help a bit that's the full error when i go to that page /graphql:
ps: I already defined GraphQL JWT Auth secret. same issue.
{
"errors": [
{
"message": "GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId\"",
"extensions": {
"category": "request"
}
}
],
"extensions": {
"debug": [
{
"type": "GRAPHQL_DEBUG",
"message": "You must define the GraphQL JWT Auth secret to use the WPGraphQL JWT Authentication plugin.",
"stack": [
"/plugins/wp-graphql-jwt-authentication-0.6.0/wp-graphql-jwt-authentication.php:195",
"/public_html/wp-includes/class-wp-hook.php:310",
"/public_html/wp-includes/class-wp-hook.php:334",
"/public_html/wp-includes/plugin.php:517",
"/public_html/wp-content/plugins/wp-graphql/src/Request.php:146",
"/public_html/wp-content/plugins/wp-graphql/src/Router.php:479",
"/public_html/wp-content/plugins/wp-graphql/src/Router.php:275",
"/public_html/wp-includes/class-wp-hook.php:310",
"/public_html/wp-includes/class-wp-hook.php:334",
"/public_html/wp-includes/plugin.php:565",
"/public_html/wp-includes/class-wp.php:398",
"/public_html/wp-includes/class-wp.php:779",
"/public_html/wp-includes/functions.php:1335",
"/public_html/wp-blog-header.php:16",
"/public_html/index.php:17"
]
}
],
"queryAnalyzer": {
"keys": "",
"keysLength": 0,
"keysCount": 0,
"skippedKeys": "",
"skippedKeysSize": 0,
"skippedKeysCount": 0,
"skippedTypes": []
}
}
}
How are you defining the salt and where in your application? Putting the constant in your wp-config.php or somewhere close to is my recommended approach.
define( 'GRAPHQL_JWT_AUTH_SECRET_KEY', 'your-secret-token' );
You need to update WPGraphQL JWT Auth. You're on v0.6.0
, it's using a out of date version of PHP-JWT
You need to update WPGraphQL JWT Auth. You're on
v0.6.0
, it's using a out of date version of PHP-JWT
@kidunot89 nope, same issue, updated it but issue persists... the jwt error might have dissappeared but the internal server error remains.. and spinner still spinning
And going to the /graphql
simply gives you the missing query message?
Here's an idea. Try going to the WooGraphQL settings tab and click the Save Changes
button
And going to the
/graphql
simply gives you the missing query message?
@kidunot89 yes it gives me this:
{
"errors": [
{
"message": "GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId\"",
"extensions": {
"category": "request"
}
}
],
"extensions": {
"debug": [],
"queryAnalyzer": {
"keys": "",
"keysLength": 0,
"keysCount": 0,
"skippedKeys": "",
"skippedKeysSize": 0,
"skippedKeysCount": 0,
"skippedTypes": []
}
}
}
And going to the
/graphql
simply gives you the missing query message?Here's an idea. Try going to the WooGraphQL settings tab and click the
Save Changes
button
@kidunot89 tried clicking save, same issue...
And going to the
/graphql
simply gives you the missing query message? Here's an idea. Try going to the WooGraphQL settings tab and click theSave Changes
button@kidunot89 tried clicking save, same issue...
Just to help a bit more.. I tried doing request with postman on the posts and it worked, but when i tried to request products it gave me the server issue...
This worked on postman:
query POST {
posts(first: 10) {
nodes {
title
}
}
}
This DID NOT work on postman:
query WHATEVER {
products(first: 10) {
nodes {
name
}
}
}
And going to the
/graphql
simply gives you the missing query message?Here's an idea. Try going to the WooGraphQL settings tab and click the
Save Changes
button
@kidunot89 Found the Issue!!! There'a conflict with WooGraphQL 0.15 & WPGraphQL for Advanced Custom Fields 0.6.1! When I deactivated it, it worked! Surprisingly older versions of WooGraphQL did not have this. Is this something you can fix asap please? I cannot update the plugins and the site I have without being sure that everything will work smoothly.
NEW UPDATE: Figured out there's a beta version 2.0.0-beta4.0.0 (https://github.com/wp-graphql/wpgraphql-acf/releases/tag/v2.0.0-beta.4.0.0), i installed that and it worked. Hopefully stable version will be published soon..
Then I guess we can consider this issue resolve 😄
Isn't PHP7.4 supported?
Download latest WordPress 6.3 and WooCommerce 8.0.1, the PHP version of server is 7.4. Go to graphqiQL and the spinner will keep spinning, Opening the console you will see internal server error. That wasn't the issue with the v12-13 versions.