Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why all methods in class with @Resolver are resolvers #36

Closed
aerodestino opened this issue Jul 19, 2018 · 3 comments
Closed

Why all methods in class with @Resolver are resolvers #36

aerodestino opened this issue Jul 19, 2018 · 3 comments

Comments

@aerodestino
Copy link

Example:
`import { Query, Resolver } from '@nestjs/graphql';

@resolver('Example')
export class ExampleResolvers {
constructor() {
}
@query('example')
async example(obj, args, context, info) {
return {name: 'alik'};
}
async otherMethod() {
return 'hello word';
}
}
`

y have this error (node:8600) UnhandledPromiseRejectionWarning: Error: Example.otherMethod defined in resolvers, but not in schema

@kamilmysliwiec
Copy link
Member

Fixed in 5.1.0

@Crewnie
Copy link

Crewnie commented Jan 17, 2019

I have exactly the same problem but only when I take the application off the server.
While I'm developing it locally, everything works fine:
npm run start: dev
works well
npm run build
compile well

but when I deploy the application on the server I get the same error that you describe.

How can I debug what I am doing wrong?

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants