Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonbahl/efbc50c79da7948c65ead127b403b08e to your computer and use it in GitHub Desktop.
Save jasonbahl/efbc50c79da7948c65ead127b403b08e to your computer and use it in GitHub Desktop.
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 ] );
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment