You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
A compile error occurred in sample / 12-graphql-apollo.
Expected behavior
Minimal reproduction of the problem with instructions
$ cd sample/12-graphql-apollo
$ yarn install
yarn install v1.12.3
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > @nestjs/graphql@5.4.0" has incorrect peer dependency "graphql@^14.0.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
✨ Done in 28.91s.
$ yarn start:prod
yarn run v1.12.3
$ tsc
node_modules/apollo-cache-control/dist/index.d.ts:20:16 - error TS2665: Invalid module name in augmentation. Module 'graphql/type/definition' resolves to an untyped module at '/Users/bisque33/Programs/nest/sample/12-graphql-apollo/node_modules/graphql/type/definition.js', which cannot be augmented.
20 declare module 'graphql/type/definition' {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/graphql-subscriptions/dist/pubsub-engine.d.ts:5:52 - error TS2304: Cannot find name 'AsyncIterator'.
5 asyncIterator<T>(triggers: string | string[]): AsyncIterator<T>;
~~~~~~~~~~~~~
node_modules/graphql-subscriptions/dist/pubsub.d.ts:15:52 - error TS2304: Cannot find name 'AsyncIterator'.
15 asyncIterator<T>(triggers: string | string[]): AsyncIterator<T>;
~~~~~~~~~~~~~
node_modules/graphql-subscriptions/dist/with-filter.d.ts:2:94 - error TS2304: Cannot find name 'AsyncIterator'.
2 export declare type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: any) => AsyncIterator<any>;
~~~~~~~~~~~~~
node_modules/graphql-tools/dist/stitching/makeRemoteExecutableSchema.d.ts:3:109 - error TS2304: Cannot find name 'AsyncIterator'.
3 export declare type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: GraphQLResolveInfo) => AsyncIterator<any>;
~~~~~~~~~~~~~
node_modules/subscriptions-transport-ws/dist/server.d.ts:5:41 - error TS2304: Cannot find name 'AsyncIterator'.
5 export declare type ExecutionIterator = AsyncIterator<ExecutionResult>;
~~~~~~~~~~~~~
node_modules/subscriptions-transport-ws/dist/server.d.ts:42:124 - error TS2304: Cannot find name 'AsyncIterator'.
42 }, operationName?: string, fieldResolver?: GraphQLFieldResolver<any, any>) => ExecutionResult | Promise<ExecutionResult> | AsyncIterator<ExecutionResult>;
~~~~~~~~~~~~~
node_modules/subscriptions-transport-ws/dist/server.d.ts:45:136 - error TS2304: Cannot find name 'AsyncIterator'.
45 }, operationName?: string, fieldResolver?: GraphQLFieldResolver<any, any>, subscribeFieldResolver?: GraphQLFieldResolver<any, any>) => AsyncIterator<ExecutionResult> | Promise<AsyncIterator<ExecutionResult> | ExecutionResult>;
~~~~~~~~~~~~~
node_modules/subscriptions-transport-ws/dist/server.d.ts:45:177 - error TS2304: Cannot find name 'AsyncIterator'.
45 }, operationName?: string, fieldResolver?: GraphQLFieldResolver<any, any>, subscribeFieldResolver?: GraphQLFieldResolver<any, any>) => AsyncIterator<ExecutionResult> | Promise<AsyncIterator<ExecutionResult> | ExecutionResult>;
~~~~~~~~~~~~~
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@kamilmysliwiec Greetings, I can still see the problem that @bisque33 had described, and his proposed fix to include the libs does seem to fix the errors.
Regarding the TypeScript version, I believe the sample code has it as a dependency at version 3.0.3.
I'm submitting a...
Current behavior
A compile error occurred in
sample / 12-graphql-apollo
.Expected behavior
Minimal reproduction of the problem with instructions
The error was solved by modifying it as follows.
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: