nodesol / lighthouse-schema-generator
Laravel GraphQL Schema Generator
1.0.1
2024-02-02 10:51 UTC
Requires
- php: >= 8.1
- doctrine/dbal: ^3.6
- nuwave/lighthouse: ^6.16
Requires (Dev)
- orchestra/testbench: ^8.10.1
- vimeo/psalm: ^5.15.0
README
本文件内容
- 更新
- 描述
- 主要包
- 安装
- 用法
更新
2021-12-21 - 基于Laravel模型和表添加了生成graphql模式的功能(仅类型)。
2023-09-10 - 升级到lighthouse 6.16。
2024-02-03 - 添加了生成(查询 & 变更)的初始支持。
描述
Lighthouse schema generator是一个为"nuwave/lighthouse"包扩展的生成graphql模式的包。
主要包
- Lighthouse-php (https://github.com/nuwave/lighthouse)
- Doctrine/DBAL (https://github.com/doctrine/dbal)
安装
- 设置 .env配置文件中的数据库连接。
- 运行
composer require nodesol/lighthouse-schema-generator
用法
Graphql schemas生成
php artisan make:graphql-schema
-f|force - force schemas generation, rewriting existing schemas --models-path= - Path for models folder, relative to app path