From b6eafbd19352bd0899e1edecc1680b1955c9af22 Mon Sep 17 00:00:00 2001 From: hooman naghiee Date: Wed, 19 Sep 2018 18:43:59 +0430 Subject: [PATCH] normalize $prefix to make it useable as schema hi this controller uses graphql.prefix config as part of shema name but prefix can be some thing like `api/graphql` or something like it i just normalize it to make it to search for `api_graphql_schema` instead of `api/graphql_schema` which isn't a valid route param name for this instance graphql.php is : ```php [ 'prefix' => 'api/graphql', 'routes' => '{api_graphql_schema?}', ] ``` --- src/Folklore/GraphQL/GraphQLController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Folklore/GraphQL/GraphQLController.php b/src/Folklore/GraphQL/GraphQLController.php index dc3f603b..f56b8740 100644 --- a/src/Folklore/GraphQL/GraphQLController.php +++ b/src/Folklore/GraphQL/GraphQLController.php @@ -19,7 +19,7 @@ public function __construct(Request $request) * @see https://laravel.com/api/5.5/Illuminate/Http/Request.html#method_route */ - $prefix = config('graphql.prefix'); + $prefix = str_replace('/','_',config('graphql.prefix')); $routeName = is_object($route) ? $route->getName()