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
I tried to update "@golevelup/nestjs-graphql-request": "^0.2.2" to the latest "0.2.4" version (besides an update to nest.js 11) but I'm getting now several errors:
Expected 1 arguments, but got 2.ts(2554)
The Implementation of the src/graphql-sdk/graphql-sdk.module.ts before the update:
ERROR [ExceptionHandler] UnknownDependenciesException [Error]: Nest can't resolve dependencies of the TypeSafeGqlSdk (?). Please make sure that the argument Symbol(GraphQLClientInject) at index [0] is available in the GraphqlSdkModule context.
Potential solutions:
- Is GraphqlSdkModule a valid NestJS module?
- If Symbol(GraphQLClientInject) is a provider, is it part of the current GraphqlSdkModule?
- If Symbol(GraphQLClientInject) is exported from a separate @Module, is that module imported within GraphqlSdkModule?
@Module({
imports: [ /* the Module containing Symbol(GraphQLClientInject) */ ]
})
at Injector.lookupComponentInParentModules (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:262:19)
at async Injector.resolveComponentInstance (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:215:33)
at async resolveParam (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:129:38)
at async Promise.all (index 0)
at async Injector.resolveConstructorParams (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:144:27)
at async Injector.loadInstance (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:70:13)
at async Injector.loadProvider (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/injector.js:98:9)
at async /Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 3)
at async InstanceLoader.createInstancesOfProviders (/Users/test/Developer/Business/project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_f2mlliwbhlpz75orla5kuwqswe/node_modules/@nestjs/core/injector/instance-loader.js:55:9) {
type: 'TypeSafeGqlSdk',
context: {
index: 0,
dependencies: [
Symbol(GraphQLClientInject)
],
name: Symbol(GraphQLClientInject)
},
metadata: {
id: 'xxx'
},
moduleRef: {
id: 'xxx'
}
}
The text was updated successfully, but these errors were encountered:
We just had a similar issue. It seems like version 5.7.0 had some breaking changes (even though it's a minor in semver) that breaks compatibility with nest v10. Make sure to update your package.json to 5.6.1. (without ^) to fix the version. It should work again :)
I'm not the one that manages the versioning but I highlighted that it should have been a major due to this API breaking change, please let me know if this works out for you
I tried to update "@golevelup/nestjs-graphql-request": "^0.2.2" to the latest "0.2.4" version (besides an update to nest.js 11) but I'm getting now several errors:
Expected 1 arguments, but got 2.ts(2554)
The Implementation of the
src/graphql-sdk/graphql-sdk.module.ts
before the update:When I remove the GraphQLRequestModule argument
Then I get the error:
The text was updated successfully, but these errors were encountered: