Skip to content
This repository was archived by the owner on Feb 10, 2019. It is now read-only.

Commit b6eafbd

Browse files
authored
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?}', ] ```
1 parent 66e9233 commit b6eafbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Folklore/GraphQL/GraphQLController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(Request $request)
1919
* @see https://laravel.com/api/5.5/Illuminate/Http/Request.html#method_route
2020
*/
2121

22-
$prefix = config('graphql.prefix');
22+
$prefix = str_replace('/','_',config('graphql.prefix'));
2323

2424
$routeName = is_object($route)
2525
? $route->getName()

0 commit comments

Comments
 (0)