nodesol/laraql
最新稳定版本:v1.0.14
Composer 安装命令:
composer require nodesol/laraql
包简介
This is my package laraql
README 文档
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.
统计信息
- 总下载量: 2.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-03