Print Schema Tool #79

schrockn-zz merged 1 commit into master from print-schema-tool
schrockn-zz
schrockn-zz9 years ago

This tool accepts an input graphql schema definition file and
outputs the corresponding introspection query result for that file

facebook-github-bot facebook-github-bot added CLA Signed
schrockn-zz schrockn-zz force pushed from 4bd8e0d7 to 3a2ba347 9 years ago
dschafer
dschafer reviewed on 2015-07-23
src/language/schema/printer.js
6 * LICENSE file in the root directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
8 */
9
dschafer9 years ago

Why is this file named printer.js?

dschafer
dschafer reviewed on 2015-07-23
src/tools/print-schema/src/index.js
47
48Required:
49
50
--file <path>: The path to the input schema definition file.
dschafer9 years ago

I kinda wish these were optional, and it would assume the first type in the input schema was the query type, and read from stdin if no file was required. But that can be in a follow-up if we ever need it.

dschafer
dschafer reviewed on 2015-07-23
src/tools/print-schema/print-schema.js
13
14var executeTool = require('./src').executeTool;
15
16
executeTool().then(function (out) {
dschafer9 years ago

The separation between script and src feels odd to me; this does the stdout stuff but the src does the file stuff? I almost wish this was just one script, since the "guts" of the script are only three lines, everything else is managing params and output.

dschafer
dschafer9 years ago

Overall, seems good, merge away after addressing inlines.

schrockn-zz Print Schema Tool
6d2fa489
schrockn-zz schrockn-zz force pushed from 3a2ba347 to 6d2fa489 9 years ago
schrockn-zz schrockn-zz merged 1618f7d5 into master 9 years ago

Login to write a write a comment.

Login via GitHub

Reviewers
No reviews
Assignees
No one assigned
Labels
Milestone