Skip to content

@Resolver+@ResolveProperty doesn't work for method #400

Closed
@galkin

Description

@galkin

@kamilmysliwiec, @MichalLytek I think this issue is similar to #368

I'm submitting a...


[ ] 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

Decorators @resolver+@ResolveProperty don't work together on single method.

[Nest] 19238   - 09/09/2019, 6:45:53 PM   [NestFactory] Starting Nest application...
[Nest] 19238   - 09/09/2019, 6:45:53 PM   [InstanceLoader] ApplicationModule dependencies initialized +39ms
[Nest] 19238   - 09/09/2019, 6:45:53 PM   [InstanceLoader] RecipesModule dependencies initialized +1ms
[Nest] 19238   - 09/09/2019, 6:45:53 PM   [InstanceLoader] GraphQLModule dependencies initialized +1ms
(node:19238) UnhandledPromiseRejectionWarning: Error: Book.Book defined in resolvers, but not in schema
(node:19238) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19238) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior

I expect to application at the example will start.

Minimal reproduction of the problem with instructions

https://github.com/galkin/nest-graphql-bug-report/blob/master/src/recipes/recipes.resolver.ts#L49

What is the motivation / use case for changing the behavior?

Environment


Nest version: 6.6.7
 
For Tooling issues:
- Node version: v10.16.3  
- Platform:  Mac 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions