anwoon / blueprint-graphql-addon
There is no license information available for the latest version (1.0.4) of this package.
The addon of blueprint for generate graphql type file for lighthouse or other library
1.0.4
2022-08-31 12:52 UTC
Requires
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0
- laravel-shift/blueprint: ^1.18 || ^2.0 || dev-master
README
Installation
composer require --dev anwoon/blueprint-graphql-addon
you need to add this in your filesystem disk
'graphql' => [ 'driver' => 'local', 'root' => 'graphql', 'throw' => false, ],
Usage
Refer to Blueprint's Basic Usage to get started. Afterwards you can run the blueprint:build
command to generate Graphql resources automatically. To get an idea of how easy it is you can use the example draft.yaml
file below.
models: Post: title: string:400 content: longtext total: decimal:8,2 status: enum:pending,successful,failed published_at: timestamp nullable author_id: id foreign:users relationships: hasMany: Comment belongsToMany: Site belongsTo: User
type Post implements Model { id: ID! title: String! content: String! total: String! status: Status! published_at: Timestamp author_id: ID! comments: [Comment!] @hasMany sites: [Site!] @belongsToMany user: User! @belongsTo } enum Status { PENDING SUCCESSFUL FAILED }