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 Graphql Relay

Laravel Graphql Relay Laravel Package

nuwave/laravel-graphql-relay

Adds Relay-style cursor pagination and global object identification to Laravel GraphQL applications, including connection fields, cursor encoding, and node interfaces. Helps you build standards-compliant GraphQL APIs that work smoothly with Relay and other GraphQL clients expecting pagination and gl...

View on GitHub
Deep Wiki
Context7

This project is deprecated in favor of https://github.com/nuwave/lighthouse

Frequently asked questions about Laravel Graphql Relay
What is nuwave/laravel-graphql-relay used for?
It is a thin Relay layer for Laravel GraphQL APIs built on Lighthouse. It provides helpers for cursor-based connections with edges and pageInfo, globally unique IDs through the Node interface, Relay-compliant mutations with clientMutationId, and reusable connection and edge field helpers. It is intended to reduce boilerplate when implementing Relay specification features in a Lighthouse schema.
Does nuwave/laravel-graphql-relay work with Laravel 10 or Laravel 11?
Almost certainly not without significant forking. The package was last released in 2016 and targets pre-modern Lighthouse internals, so it will typically conflict with PHP 8.x, Laravel 9, 10, or 11, and Lighthouse 4, 5, or 6. For modern Laravel applications, use native Lighthouse directives or write a small in-house directive instead.
Is nuwave/laravel-graphql-relay still maintained?
No. The repository is archived and the last release was in 2016, which means there are no security patches, no PHP or Laravel upgrade path, and no upstream Lighthouse compatibility work. Its 44-star count is also a weak community signal, so there is no meaningful third-party maintenance base to rely on. Treat it as unsupported.
How do I install nuwave/laravel-graphql-relay?
You would normally install it with Composer using nuwave/laravel-graphql-relay, but on a modern stack Composer will likely block installation due to PHP, Laravel, or Lighthouse version constraints. The package was designed for roughly 2016-era Laravel and Lighthouse versions. For a modern application, do not install it; use native Lighthouse features. If you must support a frozen legacy stack, pin exact versions and plan to fork.
Does modern Lighthouse already support Relay pagination and global IDs?
Yes. Current Lighthouse releases already cover much of this surface natively with directives such as @paginate, @globalId, and @node, plus connection-style pagination. These capabilities are now core platform concerns rather than reasons to add a stale dependency. Only introduce a package or custom directive for genuine gaps that native Lighthouse does not cover.
What Relay features does nuwave/laravel-graphql-relay provide?
It provides cursor-based pagination connections with edges, pageInfo, and cursors; global object identification through the Node interface and node(id:) queries; Relay-compliant mutations with clientMutationId; and reusable connection and edge field helpers. It also aims for simple integration with existing Laravel GraphQL schemas. Be aware that its Relay compliance may be partial relative to current Relay and Apollo client expectations, especially around cursor encoding and global ID resolution.
Can I use nuwave/laravel-graphql-relay with a GraphQL server other than Lighthouse?
No. It is a thin Relay layer specifically for Lighthouse and is not a general GraphQL or Relay library. Architecturally it only fits a Laravel application already committed to Lighthouse as its GraphQL server. Other GraphQL servers would need a different implementation.
What are the risks of adding nuwave/laravel-graphql-relay to a production Laravel app?
The technical risk is high. The package is archived, has no security patches, is likely to conflict with modern PHP, Laravel, and Lighthouse versions, and creates dependency lock-in once your schema and clients depend on its directive behavior. Removing it later requires a coordinated schema and client migration, and its Relay compliance may be partial. It is not appropriate for a maintained production application.
What should I use instead of nuwave/laravel-graphql-relay for Relay support in Laravel?
Use native Lighthouse features such as @paginate for cursor connections, @globalId for global IDs, and @node for the Node interface. Write a small internal directive only for genuine gaps. Back the implementation with conformance tests that assert cursor behavior, pageInfo, edge shapes, global ID encode and decode, and node resolution. This avoids a stale dependency while keeping the API Relay-compatible.
How do I migrate off nuwave/laravel-graphql-relay if it is already in my schema?
Start with a Relay capability inventory: list every connection type, global ID field, and node query that clients depend on. Freeze schema changes, add conformance tests around the current behavior, then replace directives type by type with native Lighthouse features and compare responses against the legacy implementation. Finally remove the package and coordinate any client migration. This order limits risk because it preserves the contract while removing the unsupported dependency.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo