wp-graphql / wp-graphql-jwt-authentication

Authentication for WPGraphQL using JWT (JSON Web Tokens)
GNU General Public License v3.0
337 stars 74 forks source link

No mutation queries at Gatsby's graphql #108

Open iksent opened 4 years ago

iksent commented 4 years ago

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?

alexadark commented 4 years ago

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

henrikwirth commented 4 years ago

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.