Resolver class fails to register with provider wrapper that specifies useFactory
See original GitHub issueI’m submitting a…
[ ] Regression
[x] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
When including a class decorated with @Resolver()
via a FactoryProvider, it is not registered with the Nest.js GraphQL module
Expected behavior
Expected that useFactory would work the same way as passing the resolver class directly into the providers array. Selected documentation issue / request as unsure if this approach is supported or not. docs for reference
Minimal reproduction of the problem with instructions
Minimal reproduction - steps in README
Environment
Nest version: 8.0.6
Tested in 7.x.x too - same behaviour
For Tooling issues:
- Node version: 12.16.2
- Platform: Linux
Others:
"@apollo/gateway": "^0.38.0",
"@nestjs/common": "^8.0.6",
"@nestjs/core": "^8.0.6",
"@nestjs/graphql": "^8.0.2",
"graphql": "^15.5.1",
"reflect-metadata": "^0.1.13",
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Custom providers | NestJS - A progressive Node.js framework
First, we define a provider. The @Injectable() decorator marks the CatsService class as a provider. cats.service.ts. JS ...
Read more >angular - Testing - Can't resolve all parameters for (ClassName)
I created an ApiService class to be able to handle our custom API queries, while using our own serializer + other features. ApiService...
Read more >Dependency injection in action - Angular
Angular throws an error if it can't find the dependency during that walk. ... is a constructor parameter used to specify a custom...
Read more >A Practical Guide to Providers in Angular - DEV Community
Angular's Dependency Injection system. When you use the Angular CLI to generate a service, it automatically adds the code to register the ...
Read more >Getting started with continuous integration for Nest.js APIs
I will wrap up the tutorial by showing you how to automate the testing process ... providers: [AppService], }) export class AppModule {}....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let’s track this here https://github.com/nestjs/graphql/pull/1733
Would you like to create a PR for this issue?