joarwilk / gql2flow

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

fields with default values should not be marked as optional #42

Closed mikestaub closed 6 years ago

mikestaub commented 6 years ago

Given this GraphQL type:

input PaginationInput {
  first: Int = 20
  last: Int
}

The following FlowType is generated:

declare type PaginationInput = {
  first?: number;
  last?: number;
}

But it should look like this:

declare type PaginationInput = {
  first: number;
  last?: number;
}
mikestaub commented 6 years ago

Never mind, this issue is not valid. Closing.