prisma-labs / get-graphql-schema

Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
669 stars 62 forks source link

Define arg alias and boolean types. #24

Open swim opened 6 years ago

swim commented 6 years ago

Hello,

Motivation: Without defining which args are boolean the endpoint url can accidentally be picked up as a value.

Example: node dist/index.js -j http://sym-graphql.docker.local/graphql > symfony.json

Solution: Define the boolean types; and alias to keep it tidy.

Thanks for a wonderful library, really helpful for debugging schemas / stitching.

ThisIsMissEm commented 6 years ago

Does this then change later code where we read from both argv['j'] and argv['json']? Do we only need to read from argv['json'] after this change?