Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flow + "@flow strict" #1229

Merged
merged 7 commits into from
Feb 8, 2018
Merged

Conversation

IvanGoncharov
Copy link
Member

It's such a pain to not be able to function args inside arrow functions, but the new version of Flow introduced @flow strict that makes function arguments constant.
Since @flow strict don't rely on .flowconfig it shouldn't cause the problem described in #1157.

It's a huge DX improvement for me since I spend 5-10 minutes debugging every time Flow is not able to figure out the type of function argument.

@leebyron
Copy link
Contributor

leebyron commented Feb 8, 2018

I merged in the new flow version, but we don't need to use strict pragmas since we're not using the strict linter yet. The new flow version now tracks const args, but doesn't enforce them like you can enable as a strict linter

@leebyron leebyron closed this Feb 8, 2018
@leebyron
Copy link
Contributor

leebyron commented Feb 8, 2018

I was wrong - it seems the strict mode adds additional checks in addition to applying the linter

@leebyron leebyron reopened this Feb 8, 2018
@leebyron leebyron merged commit 5fe3926 into graphql:master Feb 8, 2018
@IvanGoncharov
Copy link
Member Author

IvanGoncharov commented Feb 8, 2018

@leebyron Thanks for merge.
Why did you revert this code:

// Would prefer to use introspectionTypes.some(), however %checks needs
// a simple expression.
(type.name === __Schema.name ||
type.name === __Directive.name ||
type.name === __DirectiveLocation.name ||
type.name === __Type.name ||
type.name === __Field.name ||
type.name === __InputValue.name ||
type.name === __EnumValue.name ||
type.name === __TypeKind.name)

It was introduced in #1160 because you reverted experimental.const_params=true:
https://github.com/graphql/graphql-js/pull/1160/files#diff-87c5e74dd1f7d923143e0eee611f598eR150
Or I'm missing something?

IvanGoncharov added a commit to graphql/express-graphql that referenced this pull request Feb 19, 2018
@IvanGoncharov IvanGoncharov deleted the updateFlow branch March 9, 2018 11:22
darkhorse941019 pushed a commit to darkhorse941019/express-graphql that referenced this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants