|
3 | 3 | declare(strict_types=1);
|
4 | 4 |
|
5 | 5 | return [
|
6 |
| - // Route for the frontend |
7 |
| - 'route' => 'graphql-playground', |
| 6 | + /* |
| 7 | + |-------------------------------------------------------------------------- |
| 8 | + | GraphQL Playground endpoint |
| 9 | + |-------------------------------------------------------------------------- |
| 10 | + | |
| 11 | + | Set the endpoint to which the GraphQL Playground responds. |
| 12 | + | The default route endpoint is "yourdomain.com/graphql-playground". |
| 13 | + | |
| 14 | + */ |
8 | 15 |
|
9 |
| - // Which middleware to apply, if any |
10 |
| - 'middleware' => [ |
11 |
| - // 'web', |
| 16 | + 'route_name' => 'graphql-playground', |
| 17 | + |
| 18 | + /* |
| 19 | + |-------------------------------------------------------------------------- |
| 20 | + | Route configuration |
| 21 | + |-------------------------------------------------------------------------- |
| 22 | + | |
| 23 | + | Additional configuration for the route group https://lumen.laravel.com/docs/routing#route-groups |
| 24 | + | |
| 25 | + | For domain config it could be something like: |
| 26 | + | 'domain' => 'graphql.' . env('APP_DOMAIN', 'localhost'), |
| 27 | + */ |
| 28 | + |
| 29 | + 'route' => [ |
| 30 | + // 'prefix' => '', |
| 31 | + // 'middleware' => ['web'] |
| 32 | + 'domain' => env('GRAPHQL_PLAYGROUND_DOMAIN', null), |
12 | 33 | ],
|
13 | 34 |
|
14 |
| - // Route for the GraphQL endpoint |
| 35 | + /* |
| 36 | + |-------------------------------------------------------------------------- |
| 37 | + | Route for the GraphQL endpoint |
| 38 | + |-------------------------------------------------------------------------- |
| 39 | + | |
| 40 | + */ |
| 41 | + |
15 | 42 | 'endpoint' => 'graphql',
|
16 | 43 |
|
17 |
| - // Control if the playground is accessible at all |
18 |
| - // This allows you to disable it completely in production |
| 44 | + /* |
| 45 | + |-------------------------------------------------------------------------- |
| 46 | + | Route for the GraphQL endpoint |
| 47 | + |-------------------------------------------------------------------------- |
| 48 | + | |
| 49 | + | Control if the playground is accessible at all |
| 50 | + | This allows you to disable it completely in production |
| 51 | + | |
| 52 | + */ |
| 53 | + |
19 | 54 | 'enabled' => env('GRAPHQL_PLAYGROUND_ENABLED', true),
|
20 | 55 | ];
|
0 commit comments