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

v1.0.14 2025-12-18 04:17 UTC

README

Laravel, meet GraphQL.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.