Skip to content

Commit

Permalink
Move config files to app/config/graphql/ezplatform (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand Dunogier committed Nov 14, 2018
1 parent 2c68af0 commit 5269057
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Command/GeneratePlatformSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GeneratePlatformSchemaCommand extends Command
*/
private $generator;

const TYPES_DIRECTORY = "app/config/graphql";
const TYPES_DIRECTORY = 'app/config/graphql/ezplatform';

public function __construct(Repository $repository, SchemaGenerator $generator)
{
Expand Down
3 changes: 2 additions & 1 deletion DependencyInjection/BDEzPlatformGraphQLExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/
class BDEzPlatformGraphQLExtension extends Extension implements PrependExtensionInterface
{
const DOMAIN_SCHEMA_FILE = __DIR__. '/../../../../app/config/graphql/Domain.types.yml';
const SCHEMA_DIR = __DIR__ . '/../../../../app/config/graphql/ezplatform';
const DOMAIN_SCHEMA_FILE = self::SCHEMA_DIR . '/Domain.types.yml';

/**
* {@inheritdoc}
Expand Down
3 changes: 2 additions & 1 deletion DependencyInjection/Compiler/FieldValueTypesPass.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace BD\EzPlatformGraphQLBundle\DependencyInjection\Compiler;

use BD\EzPlatformGraphQLBundle\DependencyInjection\BDEzPlatformGraphQLExtension;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Yaml\Yaml;
Expand All @@ -12,7 +13,7 @@
*/
class FieldValueTypesPass implements CompilerPassInterface
{
const TYPES_YAML = __DIR__ . '/../../Resources/config/graphql/Field.types.yml';
const TYPES_YAML = BDEzPlatformGraphQLExtension::SCHEMA_DIR . BDEzPlatformGraphQLExtension::SCHEMA_DIR . '/Field.types.yml';

public function process(ContainerBuilder $container)
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ php bin/console bd:platform-graphql:generate-domain-schema
php bin/console cache:clear
```

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

### GraphiQL
The graphical graphQL client, GraphiQL, must be installed separately if you want to use it.
Expand Down
2 changes: 1 addition & 1 deletion doc/domain_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Queries look like this:

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

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

0 comments on commit 5269057

Please sign in to comment.