nodesol / laraql
This is my package laraql
Fund package maintenance!
nodesol
Installs: 2 482
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 2
Open Issues: 3
pkg:composer/nodesol/laraql
Requires
- php: ^8.3|^8.4
- illuminate/contracts: ^10.0||^11.0||^12.0
- mll-lab/graphql-php-scalars: ^6.4
- nuwave/lighthouse: ^6.50
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- mll-lab/laravel-graphiql: ^3.3
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
README
Laravel, meet GraphQL.
LaraQL enables you to effortlessly integrate GraphQL into your Laravel application using native PHP attributes. Published in 2025 for modern developer workflows.
LaraQL uses Code-First Discovery. Instead of maintaining a separate .graphql file, your PHP classes become the source of truth. LaraQL scans these classes and generates the SDL for Lighthouse on the fly.
Documentation
https://nodesol.github.io/laraql
Installation
Use composer to add LaraQL to your Laravel project:
composer require nodesol/laraql
Publish the default configuration to customize scan paths.
php artisan vendor:publish --tag="laraql-schema"
Usage
The #[Model()] attribute tells LaraQL that this class should be part of the GraphQL schema. LaraQL will automatically generate the necessary schema to create a Type, Input, two Queries (single/multiple), and Mutations (create/update/delete).
use Nodesol\LaraQL\Attributes\Model as ModelAttribute; #[ModelAttribute()] class Article extends Model { public string $title; }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.