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

Flow 0.68.0 compatibility #1291

Closed
stevehollaar opened this issue Mar 16, 2018 · 5 comments
Closed

Flow 0.68.0 compatibility #1291

stevehollaar opened this issue Mar 16, 2018 · 5 comments

Comments

@stevehollaar
Copy link

Flow 0.68 added some changes that introduce some new errors:

$> yarn flow
yarn run v1.5.1
$ /Users/stevehollaar/graphql-js/node_modules/.bin/flow
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/error/locatedError.js:25:38

Property path is missing in Error [1].

 [1] 19│   originalError: Error,
     20│   nodes: $ReadOnlyArray<ASTNode>,
     21│   path: $ReadOnlyArray<string | number>,
     22│ ): GraphQLError {
     23│   // Note: this uses a brand-check to support GraphQL errors originating from
     24│   // other contexts.
     25│   if (originalError && Array.isArray(originalError.path)) {
     26│     return (originalError: any);
     27│   }
     28│


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/subscription/mapAsyncIterator.js:25:14

Property return is missing in $AsyncIterator [1].

     src/subscription/mapAsyncIterator.js
      22│   const iterator = getAsyncIterator(iterable);
      23│   let $return;
      24│   let abruptClose;
      25│   if (typeof iterator.return === 'function') {
      26│     $return = iterator.return;
      27│     abruptClose = error => {
      28│       const rethrow = () => Promise.reject(error);

     node_modules/iterall/index.js.flow
 [1] 506│   & (<+TValue>(asyncIterable: AsyncIterable<TValue>) => AsyncIterator<TValue>)


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/subscription/mapAsyncIterator.js:59:18

Property throw is missing in $AsyncIterator [1].

     src/subscription/mapAsyncIterator.js
      56│         : Promise.resolve({ value: undefined, done: true });
      57│     },
      58│     throw(error) {
      59│       if (typeof iterator.throw === 'function') {
      60│         return iterator.throw(error).then(mapResult, mapReject);
      61│       }
      62│       return Promise.reject(error).catch(abruptClose);

     node_modules/iterall/index.js.flow
 [1] 506│   & (<+TValue>(asyncIterable: AsyncIterable<TValue>) => AsyncIterator<TValue>)



Found 3 errors
@IvanGoncharov
Copy link
Member

@stevehollaar It should be fixed by #1290

@kassens
Copy link
Contributor

kassens commented Mar 16, 2018

I just published 0.13.2 with #1290 merged which should fix this.

@protodaniel
Copy link

@stevehollaar, was this fixed for you?
I think it's still broken. Tried with both flow 0.68.0 and 0.69.0

@stevehollaar
Copy link
Author

@protodaniel Yes - upgrading to graphql-js: 0.13.2 fixed this for me (using flow-bin: 0.69.0 right now)

@protodaniel
Copy link

protodaniel commented Apr 11, 2018

I see, for some reason I was missing this line in the [options] of my .flowconfig
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe

I also saw that the fix is just to tell Flow to shut up ;)

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants