joarwilk / gql2flow

Convert a GraphQL Schema to a flow definition
97 stars 24 forks source link

Make output deterministic (the same each time it is run) #36

Closed trevordmiller closed 6 years ago

trevordmiller commented 7 years ago

First off, thanks for a great library! This is very useful.

Second, right now, I get a diff whenever I run gql2flow http://localhost:4000/api -o src/tools/types/schema/index.js.flow --null-keys even though the GraphQL schema hasn't changed; this diff is just the gql2flow output shuffling around in a different order:

screen shot 2017-09-15 at 10 55 30 am screen shot 2017-09-15 at 10 54 55 am

It would be great if the output wouldn't change if the input didn't change so that there is no diff when there are no changes.