Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Remove simple cache dependency (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
crisu83 authored Oct 1, 2018
1 parent 1b1ce91 commit a25fe4e
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"php": ">=7.1",
"ext-mbstring": "*",
"league/container": "^2.4",
"psr/simple-cache": "^1.0",
"react/promise": "^2.5"
},
"require-dev": {
Expand Down
7 changes: 2 additions & 5 deletions src/Schema/Building/SchemaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
use Digia\GraphQL\Language\Node\NamedTypeNode;
use Digia\GraphQL\Language\Node\SchemaDefinitionNode;
use Digia\GraphQL\Language\Node\TypeSystemDefinitionNodeInterface;
use Digia\GraphQL\Language\Node\TypeNodeInterface;
use Digia\GraphQL\Schema\DefinitionBuilder;
use Digia\GraphQL\Schema\Resolver\ResolverRegistryInterface;
use Digia\GraphQL\Schema\Schema;
use Psr\SimpleCache\InvalidArgumentException;
use function Digia\GraphQL\Type\newSchema;

class SchemaBuilder implements SchemaBuilderInterface
Expand Down Expand Up @@ -47,7 +45,6 @@ public function build(
* @param array $options
* @return BuildingContextInterface
* @throws BuildingException
* @throws InvalidArgumentException
*/
protected function createContext(
DocumentNode $document,
Expand Down Expand Up @@ -133,8 +130,8 @@ protected function getOperationTypeDefinitions(SchemaDefinitionNode $node, array
continue; // TODO: Throw exception?
}

$typeName = $operationType->getNameValue();
$operation = $operationTypeDefinition->getOperation();
$typeName = $operationType->getNameValue();
$operation = $operationTypeDefinition->getOperation();

if (isset($definitions[$typeName])) {
throw new BuildingException(
Expand Down
1 change: 0 additions & 1 deletion src/Schema/Building/SchemaBuildingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Digia\GraphQL\Schema\Building;

use League\Container\ServiceProvider\AbstractServiceProvider;
use Psr\SimpleCache\CacheInterface;

class SchemaBuildingProvider extends AbstractServiceProvider
{
Expand Down
3 changes: 0 additions & 3 deletions src/Schema/DefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use Digia\GraphQL\Type\Definition\TypeInterface;
use Digia\GraphQL\Type\Definition\UnionType;
use Digia\GraphQL\Util\ValueASTConverter;
use Psr\SimpleCache\InvalidArgumentException;
use function Digia\GraphQL\Execution\coerceDirectiveValues;
use function Digia\GraphQL\Type\introspectionTypes;
use function Digia\GraphQL\Type\newDirective;
Expand Down Expand Up @@ -85,7 +84,6 @@ class DefinitionBuilder implements DefinitionBuilderInterface
* @param array $types
* @param array $directives
* @param callable|null $resolveTypeFunction
* @throws InvalidArgumentException
*/
public function __construct(
array $typeDefinitionsMap,
Expand Down Expand Up @@ -498,7 +496,6 @@ protected function resolveType(NamedTypeNode $node): NamedTypeInterface
/**
* @param NamedTypeNode $node
* @return NamedTypeInterface|null
* @throws InvalidArgumentException
*/
public function defaultTypeResolver(NamedTypeNode $node): ?NamedTypeInterface
{
Expand Down
3 changes: 0 additions & 3 deletions src/Schema/Extension/ExtensionContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Digia\GraphQL\Type\Definition\ObjectType;
use Digia\GraphQL\Type\Definition\TypeInterface;
use Digia\GraphQL\Type\Definition\UnionType;
use Psr\SimpleCache\InvalidArgumentException;
use function Digia\GraphQL\Type\isIntrospectionType;
use function Digia\GraphQL\Type\newInterfaceType;
use function Digia\GraphQL\Type\newList;
Expand Down Expand Up @@ -364,7 +363,6 @@ protected function extendImplementedInterfaces(ObjectType $type): array
* @throws InvalidTypeException
* @throws InvariantException
* @throws ExtensionException
* @throws InvalidArgumentException
*/
protected function extendFieldMap(FieldsAwareInterface $type): array
{
Expand Down Expand Up @@ -413,7 +411,6 @@ protected function extendFieldMap(FieldsAwareInterface $type): array
/**
* @param TypeInterface $typeDefinition
* @return TypeInterface
* @throws InvalidArgumentException
* @throws InvalidTypeException
* @throws InvariantException
*/
Expand Down
1 change: 0 additions & 1 deletion src/Schema/Extension/SchemaExtensionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Digia\GraphQL\Schema\Extension;

use League\Container\ServiceProvider\AbstractServiceProvider;
use Psr\SimpleCache\CacheInterface;

class SchemaExtensionProvider extends AbstractServiceProvider
{
Expand Down

0 comments on commit a25fe4e

Please sign in to comment.