$ flow check --show-all-branches
Error โ node_modules/express-graphql/dist/index.js.flow:158:13
Cannot call getGraphQLParams(...).then with function bound to onFulfill because in the return value:
OptionsData [1] is incompatible with Promise [2].validationRules.concat because in type argument Item:validate with validationRules bound to rules because mixed [3] is incompatible with ValidationRule [4] in array element.validate with validationRules bound to rules because array type [5] is incompatible with ValidationRule [4] in array element. node_modules/express-graphql/dist/index.js.flow
[1] 43โ ) => OptionsResult)
:
[5][3] 78โ validationRules?: ?Array<mixed>,
:
151โ
152โ // Parse the Request to get GraphQL request parameters.
153โ return getGraphQLParams(request)
154โ .then(graphQLParams => {
155โ params = graphQLParams;
156โ // Then, resolve the Options to get OptionsData.
157โ return typeof options === 'function'
158โ ? options(request, response, params) // ๐ฅ
159โ : options;
160โ })
161โ .then(optionsData => {
162โ // Assert that optionsData is in fact an Object.
163โ if (!optionsData || typeof optionsData !== 'object') {
/tmp/flow/flowlib_27f728ff/core.js
[2] 595โ onFulfill: (value: R) => Promise<U> | U,
node_modules/graphql/validation/validate.js.flow
[4] 40โ rules?: $ReadOnlyArray<ValidationRule> = specifiedRules,
@langpavel Thanks for reporting ๐
Fixed on the master by https://github.com/graphql/express-graphql/commit/5c04d1838020f691cc3dc9b098635593a75e7a1d
I will try to release a new version in the next few days.
Thanks!
@IvanGoncharov Sorry to ask about this, but was this released?
@CoericK It was released yesterday as 0.7.1 ๐ฆ
Thanks @IvanGoncharov!
Most helpful comment
@langpavel Thanks for reporting ๐
Fixed on the master by https://github.com/graphql/express-graphql/commit/5c04d1838020f691cc3dc9b098635593a75e7a1d
I will try to release a new version in the next few days.