Skip to content
SPECIFICTION
Get listed

GraphQL Ruby vs Lighthouse

GraphQL Ruby

graphql-ruby.org

Lighthouse

lighthouse-php.com

Side by side

FigureGraphQL RubyLighthouse
Price from$91.67/moFree
Free planYesYes
Free trial——
Open source——
APIYesYes
Self-hostedYesYes
Plans published31
Spec score · GraphQL Tools7.8 (#11)8.1 (#7)
AuthorizationIts authorization framework supports schema visibility and checks application objects during query execution; authentication is generally handled by the application controller.The `@can` directive lets Lighthouse use Laravel Policies to restrict field operations.
InstallationThe open-source gem is installed from RubyGems by adding graphql to an application's Gemfile and running bundle install.The tutorial installs Lighthouse in a Laravel project with Composer using `composer require nuwave/lighthouse`.
Persisted queriesThe Pro OperationStore maintains normalized persisted queries using Rack and ActiveRecord or Redis storage backends, and can reject arbitrary queries when configured as a whitelist.Automatic Persisted Queries are supported with Apollo compatibility and are enabled by default when query caching is enabled.
PurposeThe graphql gem implements the GraphQL Server Specification in Ruby and adds a GraphQL API to Ruby or Rails applications.Lighthouse is a framework for serving GraphQL from Laravel.

Plans

GraphQL Ruby

  • GraphQL Ruby gemFree
  • GraphQL::Pro$1,100 a year
  • GraphQL::Enterprise$2,400 a year

GraphQL Ruby pricing →

Lighthouse

  • LighthouseFree

Lighthouse pricing →

In their own words

GraphQL Ruby

GraphQL Ruby is a free, self-hosted Ruby gem that implements the GraphQL Server Specification for Ruby or Rails applications. It provides a self-documenting, strongly typed schema and serves queries, mutations, subscriptions, streaming responses, and multiplexed queries. Configurable depth and complexity validation can reject deeply nested or overly complex requests. Authorization tools handle schema visibility and checks on application objects during execution, while authentication is generally left to the application controller. GraphQL::Dataloader batches external data access and caches results per query; AsyncDataloader supports parallel I/O. Documentation covers Relay, Apollo Client, GraphQL.js Client, GraphiQL, urql, and custom JavaScript, plus monitoring integrations. The open-source gem is installed through RubyGems and uses the MIT license. The GraphQL Ruby gem costs nothing. GraphQL::Pro costs $1,100 a year, and GraphQL::Enterprise costs $2,400 a year under commercial licenses.

Visit graphql-ruby.org

Lighthouse

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

Visit lighthouse-php.com