Skip to content

Commit 5269057

Browse files
author
Bertrand Dunogier
committed
Move config files to app/config/graphql/ezplatform (#71)
1 parent 2c68af0 commit 5269057

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Command/GeneratePlatformSchemaCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GeneratePlatformSchemaCommand extends Command
2626
*/
2727
private $generator;
2828

29-
const TYPES_DIRECTORY = "app/config/graphql";
29+
const TYPES_DIRECTORY = 'app/config/graphql/ezplatform';
3030

3131
public function __construct(Repository $repository, SchemaGenerator $generator)
3232
{

DependencyInjection/BDEzPlatformGraphQLExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
*/
1717
class BDEzPlatformGraphQLExtension extends Extension implements PrependExtensionInterface
1818
{
19-
const DOMAIN_SCHEMA_FILE = __DIR__. '/../../../../app/config/graphql/Domain.types.yml';
19+
const SCHEMA_DIR = __DIR__ . '/../../../../app/config/graphql/ezplatform';
20+
const DOMAIN_SCHEMA_FILE = self::SCHEMA_DIR . '/Domain.types.yml';
2021

2122
/**
2223
* {@inheritdoc}

DependencyInjection/Compiler/FieldValueTypesPass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace BD\EzPlatformGraphQLBundle\DependencyInjection\Compiler;
33

4+
use BD\EzPlatformGraphQLBundle\DependencyInjection\BDEzPlatformGraphQLExtension;
45
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
56
use Symfony\Component\DependencyInjection\ContainerBuilder;
67
use Symfony\Component\Yaml\Yaml;
@@ -12,7 +13,7 @@
1213
*/
1314
class FieldValueTypesPass implements CompilerPassInterface
1415
{
15-
const TYPES_YAML = __DIR__ . '/../../Resources/config/graphql/Field.types.yml';
16+
const TYPES_YAML = BDEzPlatformGraphQLExtension::SCHEMA_DIR . BDEzPlatformGraphQLExtension::SCHEMA_DIR . '/Field.types.yml';
1617

1718
public function process(ContainerBuilder $container)
1819
{

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ php bin/console bd:platform-graphql:generate-domain-schema
6363
php bin/console cache:clear
6464
```
6565

66-
It will generate a lot of yaml files in `app/config/graphql`, based on your content types.
66+
It will generate a lot of yaml files in `app/config/graphql/ezplatform`, based on your content types.
6767

6868
### GraphiQL
6969
The graphical graphQL client, GraphiQL, must be installed separately if you want to use it.

doc/domain_schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Queries look like this:
3434

3535
Run `php bin/console bd:platform-graphql:generate-domain-schema` from the root of your
3636
eZ Platform installation. It will go over your repository, and generate the matching
37-
types in `app/config/graphql/`.
37+
types in `app/config/graphql/ezplatform`.
3838

3939
Open `<host>/graphiql`. The content type groups, content types and their fields
4040
will be exposed as the schema.

0 commit comments

Comments
 (0)