Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. GraphQL Tools
  3. Lighthouse

Lighthouse

What it is

Lighthouse is a free framework for serving GraphQL from an existing Laravel application. It describes data with GraphQL Schema Definition Language and uses server-side directives to add behavior, while reusing Laravel concepts and Eloquent models. Built-in directives support creating records, resolving relationships, applying query constraints, paginating results, and validating fields and arguments. Developers can add custom directives for reusable behavior, and the @can directive family can apply Laravel Policies to restrict field operations. The default GraphQL endpoint is `/graphql`, and the documentation says any GraphQL client can use it. Lighthouse supports standard Laravel authentication mechanisms, including Sanctum. Subscriptions allow clients to observe events and receive server updates. Parsed queries can be cached with Laravel cache stores or local PHP files with OPcache; Automatic Persisted Queries are supported with Apollo compatibility. It is installed in a Laravel or Lumen project using Composer and is self-hosted. GraphQL tooling such as GraphiQL is not included. Federation support is experimental and cannot serve as a federation gateway.

For and against

For

  • Free package for Laravel or Lumen projects.
  • Built-in directives support relationships, pagination, and validation.
  • Supports Laravel authentication, including Sanctum.
  • Offers subscriptions and query caching.

Against

  • Requires an existing Laravel or Lumen project.
  • GraphQL tooling such as GraphiQL is not included.
  • Federation support is experimental and cannot be a gateway.

The verdict

Lighthouse provides GraphQL server capabilities built around Laravel and Eloquent. Developers should plan for self-hosting and separate tooling, and note the stated federation limitation.

Who it suits

Lighthouse suits PHP developers building GraphQL services on Laravel or Lumen who want to use Eloquent and Laravel features. It requires a project and a self-hosted deployment.

Plans and prices

Lighthouse

Free

Installable PHP package · requires a Laravel or Lumen project

Every plan, in full

On the record

Authentication
It supports standard Laravel authentication mechanisms and can use Laravel Sanctum for API authentication.lighthouse-php.com · read 8 Oct 2026
Authorization
The `@can` directive lets Lighthouse use Laravel Policies to restrict field operations.lighthouse-php.com · read 8 Oct 2026
Caching
Parsed GraphQL queries can be cached using Laravel cache stores or local PHP files with OPcache.lighthouse-php.com · read 7 Oct 2026
CRUD and relationships
Built-in directives support operations such as creating records and resolving Eloquent relationships.lighthouse-php.com · read 7 Oct 2026
CSRF mitigation
The optional `EnsureXHR` middleware blocks GET requests and POST requests that can be created using HTML forms to mitigate CSRF attacks.lighthouse-php.com · read 8 Oct 2026
Custom directives
Developers can implement custom directives to add reusable behavior to schema definitions.lighthouse-php.com · read 7 Oct 2026
Data access features
Built-in directives support Eloquent relationships, pagination, and query constraints.lighthouse-php.com · read 8 Oct 2026
Developer tooling
The installation documentation says Lighthouse does not include GraphQL tooling such as GraphiQL and shows GraphQL Playground as a separate package.lighthouse-php.com · read 7 Oct 2026
Eloquent
It works with existing Eloquent models and creates optimized database queries out of the box.lighthouse-php.com · read 7 Oct 2026
Federation limitation
Federation support is marked experimental, is not enabled by default, and cannot serve as a federation gateway.lighthouse-php.com · read 8 Oct 2026
GraphQL endpoint
The default GraphQL endpoint is `/graphql`, and the docs say any GraphQL client can use it.lighthouse-php.com · read 8 Oct 2026
Install
The docs install Lighthouse in a project with Composer using `composer require nuwave/lighthouse`.lighthouse-php.com · read 8 Oct 2026
Installation
The tutorial installs Lighthouse in a Laravel project with Composer using `composer require nuwave/lighthouse`.lighthouse-php.com · read 7 Oct 2026
Laravel and Eloquent
It works on an existing Laravel application and uses Eloquent models to create optimized database queries.lighthouse-php.com · read 8 Oct 2026
Laravel integration
It builds a GraphQL server on top of an existing Laravel application and is designed to reuse Laravel concepts and code.lighthouse-php.com · read 7 Oct 2026
Lumen support
The docs explain how to configure Lighthouse for Lumen and note that its service providers must be registered individually because Lumen does not support auto-discovery.lighthouse-php.com · read 8 Oct 2026
Pagination and validation
Schema directives include pagination and Laravel validation for GraphQL fields and arguments.lighthouse-php.com · read 7 Oct 2026
Persisted queries
Automatic Persisted Queries are supported with Apollo compatibility and are enabled by default when query caching is enabled.lighthouse-php.com · read 7 Oct 2026

Alternatives to Lighthouse

Every alternative, ranked