Skip to content

Dump schema: Adds option to export schema with descriptions #310

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

Merged

Conversation

adri
Copy link
Contributor

@adri adri commented Apr 9, 2018

This adds a with-descriptions option to the graphql:dump-schema command.

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? no
License MIT

@adri adri force-pushed the feature/dump-schema-including-descriptions branch 2 times, most recently from 6968b13 to 0b2d252 Compare April 9, 2018 10:56
@adri adri changed the title Dump schema: Adds option to export schema with descriptions WIP Dump schema: Adds option to export schema with descriptions Apr 9, 2018
@adri adri force-pushed the feature/dump-schema-including-descriptions branch from 0b2d252 to 5d1ecbb Compare April 9, 2018 11:59
@adri adri changed the title WIP Dump schema: Adds option to export schema with descriptions Dump schema: Adds option to export schema with descriptions Apr 9, 2018
Copy link
Contributor

@mcg-web mcg-web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR. Some changes then we can merge this 👍

->addOption(
'with-descriptions',
null,
InputOption::VALUE_OPTIONAL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace by InputOption::VALUE_NONE please

null,
InputOption::VALUE_OPTIONAL,
'Dump schema including descriptions.',
false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this please

@@ -74,13 +81,14 @@ private function createFile(InputInterface $input)
{
$format = strtolower($input->getOption('format'));
$schemaName = $input->getOption('schema');
$includeDescription = (bool) $input->getOption('with-descriptions');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-$includeDescription = (bool) $input->getOption('with-descriptions');
+$includeDescription = $input->getOption('with-descriptions');

@adri adri force-pushed the feature/dump-schema-including-descriptions branch from 5d1ecbb to 6fec004 Compare April 9, 2018 14:42
@adri
Copy link
Contributor Author

adri commented Apr 9, 2018

Thnx all done!

Copy link
Contributor

@mcg-web mcg-web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @adri 👍

@mcg-web mcg-web added this to the v0.12 milestone Apr 9, 2018
@mcg-web mcg-web merged commit 67656e5 into overblog:master Apr 9, 2018
@adri adri deleted the feature/dump-schema-including-descriptions branch April 9, 2018 15:01
@adri
Copy link
Contributor Author

adri commented Apr 9, 2018

Thanks!

@renatomefi
Copy link
Contributor

Awesome, thanks @adri

@enumag
Copy link
Contributor

enumag commented May 2, 2018

Is there a reason for this option? To me this looks like something that should be always active. In case you don't need the descriptions you can simply ignore them when processing the json.

@mcg-web
Copy link
Contributor

mcg-web commented May 2, 2018

The command was created to provide an instrospection json file for GraphQL Relay on compilation time, description is not an useful information in this case. That's the reason why this is optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants