xakepehok/array-graphql
最新稳定版本:0.0.1
Composer 安装命令:
composer require xakepehok/array-graphql
包简介
This library can convert php arrays to GraphQL fields query
README 文档
README
This library can convert php arrays to GraphQL fields query. It can remove duplicate fields and can thrown exceptions about incorrect array data
Installation
composer require xakepehok/array-graphql
Usage
<?php $fields = [ 'id', 'id', 'registeredAt', 'name' => [ 'firstName', 'firstName', 'middleName', 'lastName', ], 'history' => [ 'count', 'count', 'records' => [ 'id', 'name' => [ 'firstName', 'middleName', 'lastName', ], ] ], ]; echo \XAKEPEHOK\ArrayGraphQL\ArrayGraphQL::convert($fields);
will print something like
{
id,
registeredAt,
name {
firstName,
middleName,
lastName
},
history {
count,
records {
id,
name {
firstName,
middleName,
lastName
}
}
}
}
统计信息
- 总下载量: 142.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-07-30