I am working on a headless WordPress + Next.js app
In my GraphiQL ide when i query the current viewer (me !) I keep getting null as a result
I am using the latest WP version + latest wpgraphqQL + latest WPGraphQL CORS plugin
May be this is caused by the fact that for the moment my WordPress installation is in local but i tried to add wpgraphQL on another website in production and to reproduce this and I still get this null for my current Viewer
Don't know if this issue is linked to wpgraphQL or me
Thanks for any help
Here is my query
query MyQuery {
viewer {
name
username
}
}
Viewer queries will return
nullwhen the authenticated user is not logged in.For example:
null.If you are running queries within the WP Admin area and within the WP GraphiQL IDE, there is a small icon to the right of the "Run Query" (play) button with a profile icon.
Clicking this button will run your queries as authenticated (green dot) or not within the WP GraphiQL IDE.
You can find more details in the WP GraphQL docs here: https://www.wpgraphql.com/docs/wp-graphiql#toggle-between-public-and-authenticated-requests