nestjs / graphql

GraphQL (TypeScript) module for Nest framework (node.js) 🍷
https://docs.nestjs.com/graphql/quick-start
MIT License
1.45k stars 392 forks source link

@ResolveField identified as defined in resolver but not in schema #3294

Open sschneider-ihre-pvs opened 1 month ago

sschneider-ihre-pvs commented 1 month ago

Is there an existing issue for this?

Current behavior

with the latest version serving a graphql server might lead to an error showing up like

Error: Entity.someField defined in resolvers, but not in schema

so in 12.2.0 you get the error in 12.0.2 it is all good and also correct since most of the time it is a field in that entity type.

Maybe it is introduced by some dependency upgrade or maybe straight from nestjs/graphql

Minimum reproduction code

null

Steps to reproduce

  1. add a field to a type in graphql schema first
  2. add a @ResolveField for that field in the resolver
  3. try to serve the server
  4. getting error that the field is defined in resolver but not in schema

Expected behavior

fields should be correctly regognized as defined in resolver and schema

Package version

12.2.0

Graphql version

graphql: 16.8.0

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

Other

No response

kamilmysliwiec commented 1 month ago

Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).