Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Lighthouse Graphql Multi Schema

Laravel Lighthouse Graphql Multi Schema Laravel Package

yakovenko/laravel-lighthouse-graphql-multi-schema

Add multiple GraphQL schemas to Laravel Lighthouse with separate schema files, routes, namespaces, and middleware. Build distinct API surfaces in one Laravel app while sharing the same codebase and core services.

View on GitHub
Deep Wiki
Context7

Laravel Lighthouse GraphQL Multi-Schema lets a single Laravel application expose multiple GraphQL schemas through Lighthouse. Configure each schema independently and route requests to the right endpoint, keeping APIs isolated while sharing your Laravel models, middleware, and authentication.

  • Define and register multiple Lighthouse schemas
  • Map each schema to its own route/endpoint
  • Use separate schema, config, and resolver settings
  • Keep shared Laravel middleware and auth
  • Simplify modular or multi-tenant GraphQL APIs
Frequently asked questions about Laravel Lighthouse Graphql Multi Schema
What is yakovenko/laravel-lighthouse-graphql-multi-schema used for?
It adds multi-schema support to Laravel Lighthouse so one Laravel application can define and serve multiple GraphQL schemas. Each named schema can have its own schema file, route, middleware stack, resolver namespaces, and configuration. It is aimed at teams exposing distinct API surfaces such as public, mobile, admin, partner, or internal tooling from a single deploy.
How do I install and configure the package in a Laravel app?
Install it with Composer using composer require yakovenko/laravel-lighthouse-graphql-multi-schema, then publish its configuration and declare your named schemas. The service provider is expected to be auto-discovered, and routes may be registered automatically or wired through the package manager depending on the implementation. Before rolling out, read the composer.json constraints for nuwave/lighthouse and laravel/framework because they determine whether it is a drop-in fit.
Which Laravel and Lighthouse versions does it support?
The intended stack is Laravel 10 through 12 on PHP 8.2 or newer with Lighthouse 6.x. That said, you should verify the exact Composer constraints in the package before adopting it, because it wraps Lighthouse internals whose APIs are not contractually stable. Check the CI matrix for Laravel 10, 11, and 12 plus PHP 8.2 and 8.3 coverage if it is published.
Can each schema have its own route and middleware?
Yes, the package is designed to let each named schema have a separate route and middleware stack. That lets you gate admin, public, and partner endpoints differently. You should still write feature tests that assert each route resolves to the intended schema and middleware chain.
Are auth guards, throttling, and introspection isolated per schema?
The package's purpose is per-schema configuration for middleware, guards, throttles, complexity and depth limits, and introspection gating. Isolation is the highest-severity thing to verify because a shared default can become an auth-bypass vector rather than a convenience. Test each schema independently, especially any endpoint exposed to untrusted clients.
How does schema caching work with multiple schemas?
Lighthouse caches parsed schemas, so the package must scope cache keys by schema name. If the key is not schema-scoped, you can get cross-schema contamination where admin types leak onto a public endpoint. Verify that lighthouse:cache handles all schemas in one pass and that each schema's cache entry is distinct.
Is the package safe to use with Laravel Octane?
Multi-schema support often involves runtime config swapping or multiple manager instances, which is the classic Laravel singleton-state hazard under Octane. You must prove that per-request schema selection does not leak state between concurrent requests. Test under Octane with mixed requests across schemas before using it in production.
Does it support GraphQL federation or schema stitching?
No, this package is about isolation rather than composition. It lets you serve multiple independent schemas from one Laravel app with separate routes and configuration. Federation and stitching are materially different and carry a different risk profile, so do not assume this package provides them.
Is the package production-ready and actively maintained?
The public signals are thin: 16 stars, zero dependents, a single maintainer, and no downstream evidence of production use. The reported 2026-10-15 release date also warrants checking tag provenance and Packagist integrity before trusting version metadata. Ask for a SemVer and deprecation policy, and confirm who owns maintenance and support.
Can I implement multi-schema support myself instead of using this package?
Yes, the pattern is reimplementable in-house in a few hundred lines against Lighthouse's public SchemaBuilder and manager surface. That keeps lock-in low, which is good for adoption but means the package offers little durable moat. Evaluate whether the convenience of a maintained package outweighs the cost of owning that code yourself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console