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

apollo-client/core/QueryManager.d.ts is broken #3729

Closed
ZenSoftware opened this issue Jul 24, 2018 · 4 comments
Closed

apollo-client/core/QueryManager.d.ts is broken #3729

ZenSoftware opened this issue Jul 24, 2018 · 4 comments
Assignees
Labels

Comments

@ZenSoftware
Copy link

Broken TypeScript definition in: apollo-client@2.3.6

@hwillson I believe that TSC is producing a broken type definition file using your local machine's file system for: apollo-client/src/core/QueryManager.ts#L1006

ERROR in node_modules/apollo-client/core/QueryManager.d.ts(70,26): error TS1005: ';' expected.

This is the code producing the error:

getQueryWithPreviousResult<T>(queryIdOrObservable: string | ObservableQuery<T>): {
        previousResult: any;
        variables: import("../../../../../../../../../../Users/hwillson/Documents/git/apollo/apollo-client/packages/apollo-client/src/core/types").OperationVariables | undefined;
        document: DocumentNode;
    };
@arteforme
Copy link

Just updated and I'm also seeing this error

@kaelig
Copy link

kaelig commented Jul 24, 2018

+1

@hwillson hwillson self-assigned this Jul 24, 2018
@hwillson
Copy link
Member

Wow! That's extremely bizarre - thanks, I'm on it!

jessitron pushed a commit to atomist/sdm-core that referenced this issue Jul 24, 2018
A bad release of apollo-client was just pushed. The types aren't correct.

Revert this commit after apollographql/apollo-client#3729 is resolvedf
hwillson added a commit that referenced this issue Jul 25, 2018
Release 2.3.6 broke Typescript compilation. `QueryManager`'s
`getQueryWithPreviousResult` method included an invalid
`variables` return type in the auto-generated
`core/QueryManager.d.ts` declaration file. The type definition
had a locally referenced path, that appears to have been
caused by the typescript compiler getting confused at
compile/publish time. `getQueryWithPreviousResult` return
types are now excplicity identified, which helps Typescript
avoid the local type reference. For more details, see
#3729.

Fixes #3729.
@hwillson
Copy link
Member

apollo-client 2.3.7 has been published and should fix this. Let me know if you're still encountering any issues. Thanks!

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

No branches or pull requests

4 participants