wp-graphql / wp-graphql-jwt-authentication

Authentication for WPGraphQL using JWT (JSON Web Tokens)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NO SCHEMA AVAILABLE when activating the plugin

LarsEjaas opened this issue · comments

I am trying to installup the wp-graphql-jwt-authentication plugin, but when I activate the plugin my GraphiQL IDE explorer shows the error message "NO SCHEMA AVAILABLE" and the GraphQL endpoint returns the error: internal_server_error.

I have downloaded the most recent version as a zip file from Github (oddly enough recognized as v. 0.4.0 by WordPress). Furthermore, I have tried a direct zip link at https://api.github.com/repos/wp-graphql/wp-graphql-jwt-authentication/zipball/7905ab9e3658e6e79be510070b9e7aaf26d47009 recognized as 0.4.1 by WordPress.

Both versions will generate the same error.

I am using the latest version of WordPress v. 5.9

This is the list of WordPress plugins I use:

    headless-cms v 1.2.0
    wp-graphql v1.6.12
    wp-graphql-gutenberg v 0.3.11
    advanced-custom-fields v 5.11.4
    yoast-seo v 18.0
    wp-graphql-yoast-seo 4.16 
    wp-graphql-offset-pagination 0.2
    wp-search-with-algolia 2.1.0
    cloudinary-image-management v 3.0.0
    polylang v3.1.3
    fakerpress v 0.5.1
    duplicate-menu v 0.2.2

I have tried disabling the different plugins one by one with no luck. My GraphiQL IDE is working without the JWT plugin active.

Any known issues or workarounds for this error?

You have to have in your wp-config.php:

define( 'GRAPHQL_JWT_AUTH_SECRET_KEY', 'YOUR_STRONG_SECRET' );

Then it will generate the schema again.

Thanks @gglukmann. You are absolutely correct, I thinks that's the issue! I was sure it was set, but comming to think of it, I made some other changes to the wp-config.php file...