-
Notifications
You must be signed in to change notification settings - Fork 222
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
Dump schema: Adds option to export schema with descriptions #310
Conversation
6968b13
to
0b2d252
Compare
0b2d252
to
5d1ecbb
Compare
There was a problem hiding this 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 👍
Command/GraphQLDumpSchemaCommand.php
Outdated
->addOption( | ||
'with-descriptions', | ||
null, | ||
InputOption::VALUE_OPTIONAL, |
There was a problem hiding this comment.
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
Command/GraphQLDumpSchemaCommand.php
Outdated
null, | ||
InputOption::VALUE_OPTIONAL, | ||
'Dump schema including descriptions.', | ||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this please
Command/GraphQLDumpSchemaCommand.php
Outdated
@@ -74,13 +81,14 @@ private function createFile(InputInterface $input) | |||
{ | |||
$format = strtolower($input->getOption('format')); | |||
$schemaName = $input->getOption('schema'); | |||
$includeDescription = (bool) $input->getOption('with-descriptions'); |
There was a problem hiding this comment.
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');
5d1ecbb
to
6fec004
Compare
Thnx all done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @adri 👍
Thanks! |
Awesome, thanks @adri |
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. |
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. |
This adds a
with-descriptions
option to thegraphql:dump-schema
command.