Skip to content

Commit

Permalink
Merge branch '1.0' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
weisswurstkanone committed Aug 18, 2021
2 parents e897941 + 60ff41f commit 009b825
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/Command/GraphQL/RebuildDefinitionsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ protected function configure()
->setName('datahub:graphql:rebuild-definitions')
->setDescription('Rebuild GraphQL endpoint definitions')
->addOption(
'definitions',
'definitions',
null,
InputOption::VALUE_REQUIRED,
'Comma separated list of endpoints'
'Comma separated list of endpoints'
);
}

Expand Down Expand Up @@ -76,6 +76,11 @@ public function execute(InputInterface $input, OutputInterface $output)

$this->output->writeln('done');

return Command::SUCCESS;
if (defined('Symfony\Component\Console\Command\Command::SUCCESS')) {
return Command::SUCCESS;
} else {
//TODO remove this as soon as support for Symfony 4 gets dropped
return 0;
}
}
}
4 changes: 2 additions & 2 deletions src/GraphQL/Mutation/MutationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ public function buildDataObjectMutations(&$config = [], $context = [])
$parent = null;

if (isset($args['parentId'])) {
$parent = AbstractObject::getById($args['parentId']);
$parent = DataObject::getById($args['parentId']);
} elseif (isset($args['path'])) {
$parent = AbstractObject::getByPath($args['path']);
$parent = DataObject::getByPath($args['path']);
}

//TODO maybe add error code?
Expand Down

0 comments on commit 009b825

Please sign in to comment.