Skip to content

Commit

Permalink
fix generator commands for iterable generators
Browse files Browse the repository at this point in the history
  • Loading branch information
bpteam committed Apr 6, 2022
1 parent eaad2b6 commit 0e832f9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.4

- Upgrade base lib with bug fixing
- Fix generator commands for iterable generators

1.0.3

- Upgrade base lib with bug fixing
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"require": {
"php": "^7.4 | ^8.0",
"axtiva/flexible-graphql-php": "^1.0.2",
"axtiva/flexible-graphql-federation": "^0.3.2",
"axtiva/flexible-graphql-php": "^1.0.3",
"axtiva/flexible-graphql-federation": "^0.3.3",
"axtiva/graphql-federation-extension": "^1.0.1",
"symfony/config": "^4.4 | ^5.0 | ^6.0",
"symfony/dependency-injection": "^4.4 | ^5.0 | ^6.0",
Expand Down
6 changes: 4 additions & 2 deletions src/Command/GenerateDirectiveResolverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io->error('Directive did not found in schema ' . $directiveName);
return Command::FAILURE;
}
$code = $codeGenerator->generateDirectiveResolver($directive, $schema);

$io->success('Directive resolver generated');
$io->writeln($code->getFilename());
foreach($codeGenerator->generateDirectiveResolver($directive, $schema) as $code) {
$io->writeln($code->getFilename());
}

return Command::SUCCESS;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Command/GenerateFieldResolverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return Command::FAILURE;
}

$code = $codeGenerator->generateFieldResolver($type, $field, $schema);
$io->success('Field resolver generated');
$io->writeln($code->getFilename());
foreach ($codeGenerator->generateFieldResolver($type, $field, $schema) as $code) {
$io->writeln($code->getFilename());
}

return Command::SUCCESS;
}
Expand Down

0 comments on commit 0e832f9

Please sign in to comment.