Skip to content

Commit

Permalink
Fix graphql route reference
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Dec 16, 2019
1 parent 80bc35c commit 0e4d5e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function is_graphql_request()
if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) {
$haystack = wp_unslash( $_SERVER['HTTP_HOST'] )
. wp_unslash( $_SERVER['REQUEST_URI'] );
$needle = site_url( self::$route );
$needle = site_url( \WPGraphQL\Router::$route );
// Strip protocol.
$haystack = preg_replace( '#^(http(s)?://)#', '', $haystack );
$needle = preg_replace( '#^(http(s)?://)#', '', $needle );
Expand Down

0 comments on commit 0e4d5e9

Please sign in to comment.