zestic/app-library
Composer 安装命令:
composer require zestic/app-library
包简介
README 文档
README
Authentication
GraphQL
In your App namespace, create the following directory structure
- GraphQL
- Input
- Mutation
- Operation
- Output
- Object
- Query
- Operation
- Output
Then add these files
App\GraphQL\Mutation\MutationType
<?php declare(strict_types=1); namespace App\GraphQL\Mutation; use App\GraphQL\Mutation\Operation\UpdateSomethingMutation; use GraphQL\Type\Definition\ObjectType; final class MutationType extends ObjectType { public function __construct() { parent::__construct( [ 'name' => 'Mutation', 'fields' => [ 'updateSomething' => new UpdateSomethingMutation(), ], ] ); } }
App\GraphQL\Mutation\QueryType
<?php declare(strict_types=1); namespace App\GraphQL\Query; use App\GraphQL\Query\Operation\PingQuery; use GraphQL\Type\Definition\ObjectType; final class QueryType extends ObjectType { public function __construct() { parent::__construct( [ 'name' => 'Query', 'fields' => [ 'ping' => new PingQuery(), ], ], ); } }
App\GraphQL\Type\GraphQLType
<?php declare(strict_types=1); namespace App\GraphQL\Type; use App\GraphQL\Type; final class GraphQLType extends Type { }
Add
public static function userInfo() { return self::$userInfo ?: (self::$userInfo = new UserInfoObject()); }
Pagination
GraphQL
There is a Paginate input (paginate is a verb) and a Pagination output (pagination is a noun).
The inputs and outputs are set up to work with the React Virtualized Infinite Loader
统计信息
- 总下载量: 151
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2021-10-15