anwoon / blueprint-graphql-addon
The addon of blueprint for generate graphql type file for lighthouse or other library
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/anwoon/blueprint-graphql-addon
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 }