zidaneus/graphiql-bundle
Symfony GraphiQLBundle 使您能够在symfony项目中渲染UI
1.0.1
2024-06-18 21:54 UTC
Requires
- php: ^8.3
- symfony/http-foundation: ^7.0
- symfony/routing: ^7.0
- symfony/twig-bundle: ^7.0
Requires (Dev)
- overblog/graphql-bundle: ^1.4
- phpunit/phpunit: ^11.2
- symfony/browser-kit: ^7.0
- symfony/config: ^7.0
- symfony/console: ^7.0
- symfony/dependency-injection: ^7.0
- symfony/dom-crawler: ^7.0
- symfony/expression-language: ^7.0
- symfony/finder: ^7.0
- symfony/framework-bundle: ^7.0
- symfony/templating: ^6.4
- symfony/yaml: ^7.0
- twig/twig: ^3.3.3
- webonyx/graphql-php: ^15.4
This package is auto-updated.
Last update: 2024-09-18 22:38:06 UTC
README
此Symfony包提供了将GraphiQL接口集成到您的Symfony应用程序的功能
安装
步骤a) 下载包
在项目目录下
composer require --dev overblog/graphiql-bundle
Symfony Flex安装
注意 如果您使用的是Symfony Standard,请转到下一节
步骤a) 接受来自Symfony Flex的contrib recipes安装
- 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
更多
社区
- 在Symfony devs Slack的专用频道 overblog-graphql 上获取一些支持。
- 在GitHub上关注我们