Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Schema
schema {
query: Query
}
type Query {
foo(field: Int = 10): Int
}
config
schema:
- /tmp/demo.gql
generates:
/tmp/demo.js:
plugins:
- flow
output
/* @flow */
export type Query = {
foo: ?number
};
export type QueryFooArgs = {
field?: ?number
};
Expected behavior
field on QueryFooArgs will not have an optional sign, since there will be always this field due to default value
field: number
Am I correct in my expectations?
Thanks for reporting it @xanf !
It's definitely a bug :) I'll fix it soon
No worry, I'll have a fork with fixes, will submit a PR soon :)
Awesome!! Thanks @xanf !!
Available in 0.16.0
Most helpful comment
No worry, I'll have a fork with fixes, will submit a PR soon :)