Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Command/GraphQLConfigureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerInterface;

class GraphQLConfigureCommand extends ContainerAwareCommand
class GraphQLConfigureCommand extends Command
{
const PROJECT_NAMESPACE = 'App';

private ContainerInterface $container;

public function __construct(ContainerInterface $container)
{
parent::__construct();
$this->container = $container;
}

/**
* {@inheritdoc}
*/
Expand All @@ -31,8 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$isComposerCall = $input->getOption('composer');

$container = $this->getContainer();
$rootDir = $container->getParameter('kernel.root_dir');
$rootDir = $this->container->getParameter('kernel.root_dir');
$configFile = $rootDir . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config/packages/graphql.yml';

$className = 'Schema';
Expand Down
4 changes: 2 additions & 2 deletions Controller/GraphQLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

namespace Youshido\GraphQLBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Youshido\GraphQL\Exception\ConfigurationException;
use Youshido\GraphQLBundle\Exception\UnableToInitializeSchemaServiceException;
use Youshido\GraphQLBundle\Execution\Processor;

class GraphQLController extends Controller
class GraphQLController extends AbstractController
{
/**
* @Route("/graphql")
Expand Down
4 changes: 2 additions & 2 deletions Controller/GraphQLExplorerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class GraphQLExplorerController extends Controller
class GraphQLExplorerController extends AbstractController
{
/**
* @Route("/graphql/explorer")
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('graphql');
$treeBuilder = new TreeBuilder('graphql');
$rootNode = $treeBuilder->getRootNode();

$rootNode
->children()
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "youshido/graphql-bundle",
"name": "ozznest/base-graphql-bundle",
"description": "Symfony GraphQl Bundle",
"license": "MIT",
"authors": [
Expand Down