stayallive/lighthouse-graphql-hive
Integrates GraphQL Hive with Laravel Lighthouse: report schema usage and operations, validate schemas, and manage schema publishing from your GraphQL server.
Architecture fit: This is a thin instrumentation adapter that connects Lighthouse (the Laravel GraphQL server framework) to GraphQL Hive (The Guild's open-source schema registry and usage-reporting platform). Architecturally it is a cross-cutting concern layered onto the request lifecycle — it does not alter resolver behavior, schema shape, or the GraphQL contract. It relies on Lighthouse's middleware/event pipeline to capture operation names, timing, errors, and (optionally) traces, then ships them to Hive's usage-reporting endpoint. For teams already on Lighthouse, this is a natural seam; for teams not on Lighthouse, the package is irrelevant and Hive's generic GraphQL clients are the correct integration.
Integration feasibility: Low-to-moderate effort. Composer install, config publish, environment variables (Hive token, endpoint). The hard prerequisite is not the package — it is standing up Hive (cloud project or self-hosted) and establishing a schema-publishing workflow first, because operation telemetry is only meaningful against a known published schema. The dependency surface is small, which is both the appeal and the risk.
Technical risk:
Key questions:
Stack fit: Best fit is a Laravel monolith or service already running Lighthouse with a stable GraphQL surface. It slots into the standard Laravel package conventions (service provider, publishable config), so onboarding is familiar to any Laravel engineer. It is a producer-only integration — no database migrations, no schema changes, no change to client contracts.
Migration path: Purely additive. There is no migration of existing API behavior; the risk is operational, not structural. Because instrumentation is cross-cutting, roll it out behind environment gating (enabled in staging and production, disabled locally) to avoid noise and accidental data egress from developer machines.
Compatibility: Validate the constraint matrix before committing: PHP version against your runtime, Laravel and Lighthouse versions against your lockfile, and the Hive usage-reporting protocol version against your Hive server (cloud vs. self-hosted). Pin the package version and add a CI check that boots the app with the provider registered — this catches adapter/framework drift early.
Sequencing:
Maintenance: Low code footprint, but maintenance exposure is external — it tracks Lighthouse internals and Hive's reporting API, both of which move. Budget for periodic version bumps and a contingency to vendor the package (MIT license permits forking) if upstream stalls. Assign a named owner.
Support: The author is a known figure in the Laravel community, which is reassuring, but the project is small and there is no commercial SLA on the package itself. Hive (The Guild) has an active OSS community and commercial offering, so the platform side is better supported than the adapter side. Distinguish the two when assessing risk.
Scaling: Usage reporting adds outbound network calls on a request-adjacent path. At high request rates, sampling rate and buffering/flush behavior are the levers — unbatched synchronous sends will show up in tail latency. Confirm the package does not block the response on a successful Hive round-trip; if it does, move reporting off the critical path or raise sampling thresholds. Hive ingestion limits and payload size caps on the self-hosted side also need capacity planning.
Failure modes:
Ramp-up: A Laravel engineer can wire this in under a day; the real ramp is on Hive's data model — schema versions, operation naming, and alert thresholds — plus the CI schema-publish workflow. Estimate one to two engineer-days for a working setup and roughly a sprint of iteration before the dashboards and alerts are trustworthy enough to be used in incident response.
How can I help you explore Laravel packages today?