You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.2 KiB

1 month ago
  1. <?php declare(strict_types=1);
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Routes configuration
  6. |--------------------------------------------------------------------------
  7. |
  8. | Set the key as URI at which the GraphiQL UI can be viewed,
  9. | and add any additional configuration for the route.
  10. |
  11. | You can add multiple routes pointing to different GraphQL endpoints.
  12. |
  13. */
  14. 'routes' => [
  15. '/playground' => [
  16. 'name' => 'graphiql',
  17. // 'middleware' => ['web']
  18. // 'prefix' => '',
  19. // 'domain' => 'graphql.' . env('APP_DOMAIN', 'localhost'),
  20. /*
  21. |--------------------------------------------------------------------------
  22. | Default GraphQL endpoint
  23. |--------------------------------------------------------------------------
  24. |
  25. | The default endpoint that the GraphiQL UI is set to.
  26. | It assumes you are running GraphQL on the same domain
  27. | as GraphiQL, but can be set to any URL.
  28. |
  29. */
  30. 'endpoint' => '/graphql',
  31. /*
  32. |--------------------------------------------------------------------------
  33. | Subscription endpoint
  34. |--------------------------------------------------------------------------
  35. |
  36. | The default subscription endpoint the GraphiQL UI uses to connect to.
  37. | Tries to connect to the `endpoint` value if `null` as ws://{{endpoint}}
  38. |
  39. | Example: `ws://your-endpoint` or `wss://your-endpoint`
  40. |
  41. */
  42. 'subscription-endpoint' => env('GRAPHIQL_SUBSCRIPTION_ENDPOINT', null),
  43. ],
  44. ],
  45. /*
  46. |--------------------------------------------------------------------------
  47. | Control GraphiQL availability
  48. |--------------------------------------------------------------------------
  49. |
  50. | Control if the GraphiQL UI is accessible at all.
  51. | This allows you to disable it in certain environments,
  52. | for example you might not want it active in production.
  53. |
  54. */
  55. 'enabled' => env('GRAPHIQL_ENABLED', true),
  56. ];