emsifa / graphit
PHP GraphQL 框架
dev-master
2018-05-11 11:51 UTC
Requires
- php: ^7.1
- nyholm/psr7: ^0.3.0
- rakit/console: ^v0.1
- webonyx/graphql-php: ^0.11.5
This package is auto-updated.
Last update: 2024-09-22 01:06:35 UTC
README
Graphit 是一个专门的 '框架',用于创建 graphql 应用程序。与通常提供的 RESTful 路由、中间件、ORM 等的 PHP 框架不同,Graphit 只有一个主要功能,即执行 graphql 查询(gql)。为了执行这些 gql,Graphit 使用了 webonyx/graphql-php 库。
与一般的框架一样,Graphit 的目标是
- 易于构建。
- 易于维护。
为此,Graphit 提供以下功能
- 通过 graphql SDL 简化 schema 的定义。
- 帮助创建更易于理解的目录结构。
- 使用 AST 缓存 提高应用程序性能。
- 依赖注入(DI)容器。
- 文件上传遵循 graphql-multipart-request-spec 规范。
- 集成 GraphiQL。
- 易于集成到多个流行的 PHP 框架。
安装
要安装 Graphit,请创建新的应用程序目录。然后运行以下 composer 命令
composer require emsifa/graphit:dev-master
设置
进行中(请查看 example 文件夹)
配置
进行中(请查看 example 文件夹)