overblog / graphiql-bundle
Symfony GraphiQLBundle 使得可以在您的 symfony 项目中渲染 UI
v0.3.0
2021-12-08 11:28 UTC
Requires
- php: ^8.0
- symfony/http-foundation: ^5.3.7 || ^6.0
- symfony/routing: ^5.3.7 || ^6.0
- symfony/twig-bundle: ^5.3.7 || ^6.0
Requires (Dev)
- overblog/graphql-bundle: dev-master
- phpunit/phpunit: ^9.5.10
- sensio/framework-extra-bundle: ^6.2
- symfony/browser-kit: ^5.3 || ^6.0
- symfony/config: ^5.3.7 || ^6.0
- symfony/console: ^5.3.7 || ^6.0
- symfony/dependency-injection: ^5.3.7 || ^6.0
- symfony/dom-crawler: ^5.3.7 || ^6.0
- symfony/expression-language: ^5.3.7 || ^6.0
- symfony/finder: ^5.3.7 || ^6.0
- symfony/framework-bundle: ^5.3.7 || ^6.0
- symfony/templating: ^5.3.7 || ^6.0
- symfony/yaml: ^5.3.7 || ^6.0
- twig/twig: ^3.3.3
- webonyx/graphql-php: dev-master
This package is auto-updated.
Last update: 2024-09-09 14:29:15 UTC
README
此 Symfony 扩展提供将 GraphiQL 界面集成到您的 Symfony 应用程序中
安装
a) 下载扩展包
在项目目录中
composer require --dev overblog/graphiql-bundle
Symfony Flex 安装
注意 如果您使用的是 Symfony Standard,请转到下一节
a) 接受 Symfony Flex 的 contrib 菜单安装
- WARNING overblog/graphiql-bundle (0.1): From github.com/symfony/recipes-contrib
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
Do you want to execute this recipe?
[y] Yes
[n] No
[a] Yes for all packages, only for the current installation session
[p] Yes permanently, never ask again for this project
(defaults to n):
b) 如果您没有 twig
在项目目录中
composer require twig
如果您仅使用 twig 进行 graphiql,可以在 composer require 时使用 --dev
Symfony Standard 安装
a) 在 'dev' 部分启用扩展包
// in app/AppKernel.php class AppKernel extends Kernel { // ... public function registerBundles() { if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... $bundles[] = new Overblog\GraphiQLBundle\OverblogGraphiQLBundle(); } } }
b) 启用 GraphiQL 端点
# in app/config/routing_dev.yml overblog_graphiql_endpoint: resource: "@OverblogGraphiQLBundle/Resources/config/routing.xml"
完成
现在已完成,在项目 URL 中导航到 /graphiql
更多
社区
- 在专门的频道 overblog-graphql 中,在 Symfony devs Slack 上获取一些支持。
- 在 GitHub 上关注我们