diff --git a/src/GraphQL/ServiceProvider.php b/src/GraphQL/ServiceProvider.php index a71c0dc935..0f95eab265 100644 --- a/src/GraphQL/ServiceProvider.php +++ b/src/GraphQL/ServiceProvider.php @@ -49,9 +49,7 @@ private function hasPublishedConfig() private function disableGraphqlRoutes() { - $key = $this->isLegacyRebingGraphql() ? 'graphql.routes' : 'graphql.route'; - - config([$key => false]); + config(['graphql.route' => false]); } private function addMiddleware() @@ -73,9 +71,4 @@ private function setDefaultSchema() { config(['graphql.schemas.default' => DefaultSchema::class]); } - - protected function isLegacyRebingGraphql() - { - return class_exists('\Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments'); - } } diff --git a/src/Http/Controllers/CP/GraphQLController.php b/src/Http/Controllers/CP/GraphQLController.php index 97e8be24c7..aad55bc3e2 100644 --- a/src/Http/Controllers/CP/GraphQLController.php +++ b/src/Http/Controllers/CP/GraphQLController.php @@ -20,17 +20,8 @@ public function graphiql() { $this->authorize('view graphql'); - $configKey = $this->isLegacyRebingGraphql() - ? 'graphql.prefix' - : 'graphql.route.prefix'; - return view('statamic::graphql.graphiql', [ - 'url' => '/'.config($configKey), + 'url' => '/'.config('graphql.route.prefix'), ]); } - - protected function isLegacyRebingGraphql() - { - return class_exists('\Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments'); - } }