Skip to content

Route check prevents middleware decoration #36

@charles-ritchie

Description

@charles-ritchie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions