December 5, 2025

Lighthouse: A Simple, Flexible GraphQL Layer for Laravel

A quick overview of how Lighthouse brings GraphQL to your Laravel apps

package
Lighthouse: A Simple, Flexible GraphQL Layer for Laravel

GraphQL is a powerful way to build modern APIs — but wiring it into Laravel manually can get messy. Lighthouse solves that by giving you a clean, schema-first GraphQL framework that fits naturally into Laravel’s ecosystem.

What Lighthouse Does

Lighthouse brings a set of practical, developer-friendly features:

1. Schema-First API Design

You define your entire API using a GraphQL schema file. This keeps things predictable and extremely maintainable.

2. Easy Eloquent Integration

Lighthouse ships with built-in directives for querying and mutating Laravel models. Example:

type Query { posts: [Post!]! @paginate(model: "App\\Models\\Post") }

Installation

Setting it up is straightforward:

composer require nuwave/lighthouse

Then publish the configuration:

php artisan vendor:publish --tag=lighthouse-schema

You’re ready to start building GraphQL schemas immediately.

Did you find this article helpful? Share it!