- How do I install mll-lab/laravel-graphql-voyager in a Laravel app?
- Install it with Composer using composer require mll-lab/laravel-graphql-voyager. The service provider is registered through Laravel package auto-discovery, so you do not need to add anything to config/app.php or bootstrap/providers.php. Optionally publish the package config with php artisan vendor:publish to customize the route URI, middleware, or GraphQL endpoint. Then open the Voyager route in your browser to inspect the schema.
- Which Laravel versions does laravel-graphql-voyager support?
- Version 2.3.0 declared support for Laravel 11, and the earlier 2.x line targets Laravel 9 and 10. The release notes do not state whether the Composer constraint was widened to ^10.0|^11.0 or narrowed to ^11.0 only, so check the require block in composer.json on the tag you install. Remember that Laravel 11 itself requires PHP 8.2 or newer, which effectively raises your runtime floor.
- Is this package compatible with Laravel 11's slim skeleton and removed HTTP Kernel?
- Yes, compatibility does not depend on app/Http/Kernel.php because the package registers itself via Composer auto-discovery (extra.laravel.providers) and merges its configuration with mergeConfigFrom. That is exactly the pattern Laravel 11 expects from packages. Still run a smoke test against your own application, since provider boot failures under the slim skeleton are a common surprise.
- How do I change the URL where GraphQL Voyager is served?
- Publish the package config file with php artisan vendor:publish, then edit the route URI key to whatever path you want, such as admin/graphql-voyager. The same config block controls the middleware stack applied to the route. Run php artisan config:clear afterwards so the new value takes effect. The default path is typically /graphql-voyager.
- How does GraphQL Voyager get my schema?
- Voyager runs a standard introspection query against your configured GraphQL endpoint at runtime, then renders the returned type system as an interactive graph. It does not parse your PHP code or generate any artifacts, so introspection must be enabled on that endpoint. If you disable introspection in production, Voyager will fail to render the graph.
- Is it safe to leave GraphQL Voyager enabled in production?
- The route exposes your entire schema to anyone who can reach it, so treat it as a developer tool rather than a public page. Gate it behind auth middleware, a Gate or ability check, or an environment condition in the published config. Many teams simply disable the route outside local and staging environments.
- Can I point Voyager at a GraphQL endpoint other than the default?
- Yes, the GraphQL endpoint is configurable through the published config file. That is useful when your API lives under a versioned prefix, a custom Lighthouse route, or a separate host. Set the endpoint value, clear the config cache, and reload the Voyager route.
- Is upgrading from 2.2.x to 2.3.0 a breaking change for Laravel 10 applications?
- It depends entirely on the Composer constraint, and the release note only says Laravel 11 support was added without mentioning removals. Inspect the composer.json diff on the 2.3.0 tag: if it reads ^10.0|^11.0 the update is additive and safe, but if it narrowed to ^11.0 it is a de facto breaking change. In the narrowed case, stay on 2.2.x until your framework upgrade lands. Also verify there is a green CI job for Laravel 11 on PHP 8.2 and 8.3 rather than trusting the claim alone.
- How do I test that the Voyager integration actually works?
- Load the configured route in a browser and confirm the graph renders your types and relationships, which proves both routing and endpoint introspection are working. Add an HTTP feature test asserting a 200 response from the route, plus a 403 or redirect for unauthorized users if you have gated it. Run the package's own test suite in CI against your exact Laravel and PHP versions before promoting to staging.
- What are the alternatives to laravel-graphql-voyager?
- GraphiQL and GraphQL Playground are interactive query IDE alternatives, while Apollo Sandbox and the standalone graphql-voyager build cover the schema visualization use case outside Laravel. Some GraphQL server packages also ship their own schema explorer UI. Choose this package when you want Voyager embedded directly in a Laravel route with a single Composer dependency and minimal setup.