[ ] 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.
Error when run e2e-tests:
TypeError: this.httpServer.getInstance is not a function
at GraphQLModule.<anonymous> (node_modules/@nestjs/graphql/dist/graphql.module.js:91:41)
at node_modules/@nestjs/graphql/dist/graphql.module.js:19:71
at Object.<anonymous>.__awaiter (node_modules/@nestjs/graphql/dist/graphql.module.js:15:12)
at GraphQLModule.onModuleInit (node_modules/@nestjs/graphql/dist/graphql.module.js:89:16)
at NestApplication.callModuleInitHook (node_modules/@nestjs/core/nest-application-context.js:66:39)
No error
Nest version: 5.3.2
For Tooling issues:
- Node version: 10.1.0
- Platform: Windows
youp same for me
Env:
node -v v10.9.0
osx
npm -v 6.2.0
deps
"@nestjs/common": "^5.3.2",
"@nestjs/core": "^5.3.3",
"@nestjs/graphql": "^5.1.1",
"@nestjs/microservices": "^5.3.2",
"@nestjs/typeorm": "^5.2.0",
"@nestjs/websockets": "^5.3.1",
"apollo-link-ws": "^1.0.8",
"apollo-server": "^2.0.6",
"apollo-server-express": "^2.0.5",
"graphql": "^14.0.0",
"graphql-subscriptions": "^0.5.8",
"graphql-tools": "^3.1.1",
I can copy that. If you add the GraphQL Module
GraphQLModule.forRoot({
typePaths: ['./**/*.graphql']
})
the e2e tests will fail. If you comment out those three lines it works.
Update:
So in the end within the GraphQL Module the injected HttpServer is an empty object.
constructor(
@Inject(HTTP_SERVER_REF) private httpServer: HttpServer,
@Inject(GRAPHQL_MODULE_OPTIONS) private readonly options: GqlModuleOptions,
private readonly graphQLFactory: GraphQLFactory,
) {}
exact same situation here
I added a e2e test to nest graphql appolo sample to help
It can now be reproduced here https://github.com/cyril-lakech/nest/tree/test/e2eGraphQL/sample/12-graphql-apollo
Fixed in 5.2.0. Ensure to update Nest packages (core, common) as well.
Thanks you so much
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Fixed in 5.2.0. Ensure to update Nest packages (core, common) as well.