WPGraphQL
WPGraphQL
BlogREPL
GitHubWordPress Plugin

Developer Reference

  • Overview
  • Actions
  • Filters
  • Functions
  • Recipes
  1. Developer Reference
  2. /Recipes
  3. /Debugging JWT Authentication

Debugging JWT Authentication

This snippet outputs the $_SERVER superglobal so we can see if the Authorization token is being passed to the server or not.

add_action( 'init', function() {

	if ( is_graphql_http_request() ) {
		wp_send_json( [ 'server' => $_SERVER ] );
	}

} );

Related APIs

Functions

  • is_graphql_http_request
← PreviousChanging the Server Debug FlagNext →Deprecating a field in the Schema

On this page

  • Overview
  • Related APIs
WPGraphQL
WPGraphQL

© 2026 WPGraphQL · GPL-3 Licensed

GitHubWordPress PluginTwitterYouTubeDiscord