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

Route check prevents middleware decoration #36

Open
charles-ritchie opened this issue Feb 9, 2021 · 0 comments
Open

Route check prevents middleware decoration #36

charles-ritchie opened this issue Feb 9, 2021 · 0 comments
Labels

Comments

@charles-ritchie
Copy link

SilversStripe\GraphQLDevTools\Controller checks if a route is like so:

if ($routeController instanceof GraphQLController) {
    $schemaKey = class_exists(Schema::class)
        ? $routeController->getSchema()->getSchemaKey()
        : $routeController->getManager()->getSchemaKey();
    if ($schemas === '*' || in_array($schemaKey, $schemas)) {
        $routes[$schemaKey] = Path::normalise($pattern, true);
    }
}

This precludes using SilverStripe\Control\Middleware\RequestHandlerMiddlewareAdapter to decorate SilverStripe\GraphQL\Controller with middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants