wp-graphql-jwt-authentication icon indicating copy to clipboard operation
wp-graphql-jwt-authentication copied to clipboard

No mutation queries at Gatsby's graphql

Open iksent opened this issue 5 years ago • 2 comments

Just installed the plugin at WordPress, then added configuration at .htaccess.

And I do not see any authorization mutation queries at http://localhost:8000/___graphql.

My Stack: https://localwp.com/ PHP: 7.3.5 Apache MySQL 8.0.16 WP: 5.4.2 gatsby: "2.22.5" gatsby-source-wordpress-experimental: "^1.0.7",

What could be the problem?

iksent avatar Aug 07 '20 15:08 iksent

Same problem, so I check the mutations in WordPress backoffice with https://github.com/wp-graphql/wp-graphiql plugin but it would be nice to see them in gatbsy

alexadark avatar Aug 25 '20 06:08 alexadark

You can't see them in Gatsby, since this is something dynamic and not static. You have to use something like Apollo Client to make the GraphQL connection. Then you just have to check the WPGraphiQL endpoints and use them.

The schema of gatsby-source-wordpress-experimental is different from what you get directly from WPGraphQL. It is more designed for static queries. Not sure if this might change in the future, maybe Gatsby will somehow include a dynamic pattern too, but for now it is like that.

henrikwirth avatar Aug 25 '20 09:08 henrikwirth