Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Drop legacy rebing/graphql-laravel code #9935

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/GraphQL/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -73,9 +71,4 @@ private function setDefaultSchema()
{
config(['graphql.schemas.default' => DefaultSchema::class]);
}

protected function isLegacyRebingGraphql()
{
return class_exists('\Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments');
}
}
11 changes: 1 addition & 10 deletions src/Http/Controllers/CP/GraphQLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Loading