Skip to content

Commit

Permalink
Some cleanup (services directory, unused files) (#27)
Browse files Browse the repository at this point in the history
* Moved services to Resources/config/services

* Removed unused draft/Mutation.types.yml file

* Removed unused ContentMutation file

* Marked resolvers as @internal

* Removed TODO.md
  • Loading branch information
bdunogier authored and Łukasz Serwatka committed Mar 29, 2019
1 parent 11a0415 commit 3c0fc30
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 64 deletions.
16 changes: 0 additions & 16 deletions TODO.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public function load(array $configs, ContainerBuilder $container)
$config = $this->processConfiguration($configuration, $configs);

$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('schema.yml');
$loader->load('resolvers.yml');
$loader->load('services.yml');
$loader->load('services/data_loaders.yml');
$loader->load('services/mutations.yml');
$loader->load('services/resolvers.yml');
$loader->load('services/schema.yml');
$loader->load('services/services.yml');
$loader->load('default_settings.yml');
$loader->load('services/data_loaders.yml');
}

/**
Expand Down
14 changes: 0 additions & 14 deletions src/GraphQL/Mutation/ContentMutation.php

This file was deleted.

3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ContentResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use eZ\Publish\API\Repository\Values\Content\Query;
use eZ\Publish\API\Repository\Values\Content\Search\SearchHit;

/**
* @internal
*/
class ContentResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ContentTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use eZ\Publish\API\Repository\ContentTypeService;
use Overblog\GraphQLBundle\Resolver\TypeResolver;

/**
* @internal
*/
class ContentTypeResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/DateResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
use DateTime;
use Overblog\GraphQLBundle\Definition\Argument;

/**
* @internal
*/
class DateResolver
{
public function resolveDateToFormat($date, $args)
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/DomainContentMutationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Overblog\GraphQLBundle\Relay\Node\GlobalId;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;

/**
* @internal
*/
class DomainContentMutationResolver
{
/**
Expand Down
4 changes: 3 additions & 1 deletion src/GraphQL/Resolver/DomainContentResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Overblog\GraphQLBundle\Resolver\TypeResolver;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;

/**
* @internal
*/
class DomainContentResolver
{
/**
Expand Down Expand Up @@ -87,7 +90,6 @@ public function resolveDomainContentItem(Argument $args, $contentTypeIdentifier)

$content = $this->contentLoader->findSingle($criterion);

// @todo consider optimizing using a map of contentTypeId
$contentType = $this->contentTypeLoader->load($content->contentInfo->contentTypeId);

if ($contentType->identifier !== $contentTypeIdentifier) {
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/FieldDefinitionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;

/**
* @internal
*/
class FieldDefinitionResolver
{
public function resolveFieldDefinitionName(FieldDefinition $fieldDefinition, $args)
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ImageAssetFieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use eZ\Publish\Core\FieldType\ImageAsset\AssetMapper;
use EzSystems\EzPlatformGraphQL\GraphQL\Value\Field;

/**
* @internal
*/
class ImageAssetFieldResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ImageFieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use Overblog\GraphQLBundle\Error\UserError;
use eZ\Publish\Core\FieldType\Image\Value as ImageFieldValue;

/**
* @internal
*/
class ImageFieldResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/LocationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use eZ\Publish\API\Repository\LocationService;
use Overblog\GraphQLBundle\Resolver\TypeResolver;

/**
* @internal
*/
class LocationResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ObjectStateGroupResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use GraphQL\Error\UserError;
use Overblog\GraphQLBundle\Definition\Argument;

/**
* @internal
*/
class ObjectStateGroupResolver
{
/** @var \eZ\Publish\API\Repository\ObjectStateService */
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/ObjectStateResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use GraphQL\Error\UserError;
use Overblog\GraphQLBundle\Definition\Argument;

/**
* @internal
*/
class ObjectStateResolver
{
/** @var \eZ\Publish\API\Repository\ObjectStateService */
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/RichTextResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use DOMDocument;
use eZ\Publish\Core\FieldType\RichText\Converter as RichTextConverterInterface;

/**
* @internal
*/
class RichTextResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/SearchResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use eZ\Publish\API\Repository\SearchService;
use Overblog\GraphQLBundle\Relay\Connection\Paginator;

/**
* @internal
*/
class SearchResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/SectionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use eZ\Publish\API\Repository\SectionService;
use Overblog\GraphQLBundle\Resolver\TypeResolver;

/**
* @internal
*/
class SectionResolver
{
/**
Expand Down
4 changes: 3 additions & 1 deletion src/GraphQL/Resolver/SelectionFieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
namespace EzSystems\EzPlatformGraphQL\GraphQL\Resolver;

use eZ\Publish\API\Repository\Values\Content\Content;
use eZ\Publish\API\Repository\Values\Content\ContentInfo;
use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;
use EzSystems\EzPlatformGraphQL\GraphQL\Value\Field;
use EzSystems\EzPlatformGraphQL\GraphQL\DataLoader\ContentTypeLoader;

/**
* @internal
*/
class SelectionFieldResolver
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/Resolver/UrlAliasResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use eZ\Publish\API\Repository\Values\Content\URLAlias;
use Overblog\GraphQLBundle\Resolver\TypeResolver;

/**
* @internal
*/
class UrlAliasResolver
{
/**
Expand Down
4 changes: 3 additions & 1 deletion src/GraphQL/Resolver/UserResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
*/
namespace EzSystems\EzPlatformGraphQL\GraphQL\Resolver;

use eZ\Publish\API\Repository\ContentService;
use eZ\Publish\API\Repository\LocationService;
use eZ\Publish\API\Repository\UserService;
use eZ\Publish\API\Repository\Values\Content\Content;
use eZ\Publish\API\Repository\Values\User\UserGroup;

/**
* @internal
*/
class UserResolver
{
/**
Expand Down
27 changes: 0 additions & 27 deletions src/Resources/config/draft/Mutation.types.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3c0fc30

Please sign in to comment.