ncrypthic / doctrine-graphql-bundle
Symfony扩展,用于ncrypthic/doctrine-graphql库
1.4.0
2020-07-03 04:29 UTC
Requires
This package is auto-updated.
Last update: 2024-09-11 19:59:30 UTC
README
这是一个用于ncrypthic/doctrine-graphql库的Symfony扩展
安装
composer require ncrypthic/doctrine-graphql-bundle
配置
- 在Symfony的
AppKernel
中启用该扩展
<?php // file: app/AppKernel.php public function registerBundles() { $bundles = array( // ... other bundles new LLA\DoctrineGraphQLBundle\DoctrineGraphQLBundle(), ); }
- 配置该扩展
# file: app/config/config.yml lla_doctrine_graphql: cache_service: cache.app # default entity_manager_service: doctrine.orm.default_entity_manager debug: false # GraphQL error debugging, default: false
- 添加graphql路由
graphql: path: /graphql method: POST defaults: { _controller: LLADoctrineGraphQLBundle:DoctrineGraphQL:graphql }