Created
February 2, 2024 00:06
-
-
Save patrickacioli/33b24e736239dbade8adcf37982cf290 to your computer and use it in GitHub Desktop.
Apollo Driver Error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { GraphQLModule } from '@nestjs/graphql'; | |
| import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo'; | |
| @Module({ | |
| imports: [ | |
| ConfigModule.forRoot({ | |
| expandVariables: true, | |
| isGlobal: true, | |
| envFilePath: [path.resolve('.env')], | |
| load: [], | |
| }), | |
| GraphQLModule.forRoot<ApolloDriverConfig>({ | |
| driver: ApolloDriver, | |
| }), | |
| ], | |
| controllers: [], | |
| providers: [], | |
| }) | |
| export class AppModule {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 9:01:39 PM] Found 0 errors. Watching for file changes. | |
| [Nest] 37647 - 02/01/2024, 9:01:39 PM LOG [NestFactory] Starting Nest application... | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM LOG [InstanceLoader] AppModule dependencies initialized +23ms | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM LOG [InstanceLoader] PassportModule dependencies initialized +2ms | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM LOG [InstanceLoader] AuthorizationModule dependencies initialized +0ms | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM LOG [InstanceLoader] AuthSecurityModule dependencies initialized +0ms | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM LOG [InstanceLoader] ConfigHostModule dependencies initialized +8ms | |
| [Nest] 37647 - 02/01/2024, 9:01:40 PM ERROR [ExceptionHandler] Nest can't resolve dependencies of the ApolloDriver. Please make sure that the "graphQlFactory" property is available in the current context. | |
| Potential solutions: | |
| - Is GraphQLModule a valid NestJS module? | |
| - If GraphQLFactory is a provider, is it part of the current GraphQLModule? | |
| - If GraphQLFactory is exported from a separate @Module, is that module imported within GraphQLModule? | |
| @Module({ | |
| imports: [ /* the Module containing GraphQLFactory */ ] | |
| }) | |
| Error: Nest can't resolve dependencies of the ApolloDriver. Please make sure that the "graphQlFactory" property is available in the current context. | |
| Potential solutions: | |
| - Is GraphQLModule a valid NestJS module? | |
| - If GraphQLFactory is a provider, is it part of the current GraphQLModule? | |
| - If GraphQLFactory is exported from a separate @Module, is that module imported within GraphQLModule? | |
| @Module({ | |
| imports: [ /* the Module containing GraphQLFactory */ ] | |
| }) | |
| at Injector.lookupComponentInParentModules (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:254:19) | |
| at Injector.resolveComponentInstance (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:207:33) | |
| at /Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:313:38 | |
| at async Promise.all (index 2) | |
| at Injector.resolveProperties (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:304:27) | |
| at callback (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:64:36) | |
| at Injector.resolveConstructorParams (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:144:24) | |
| at Injector.loadInstance (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:70:13) | |
| at Injector.loadProvider (/Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/injector.js:97:9) | |
| at /Volumes/SSD_ACIOLI/docs/work/jrcia/insight-led/node_modules/@nestjs/core/injector/instance-loader.js:56:13 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment