I am currently using Nestjs GraphQL. I have a question about the schema declaration method for GraphQL’s ResolveField.
Previously, I declared all fields in the Type. However, I recently added a field to the Resolver using ResolveField without declaring it in the Type, and noticed that the undeclared field was added to the Type. Is it intentional that fields can be added to the Type solely through ResolveField without being declared in the Type?
I declared the type and added a ResolveField that was not declared in the type. Upon checking the schema, I noticed that the field added via ResolveField was included. After examining the NestJS/graphql ResolveField code, it seems that fields are lazily added to the schema. However, I am curious if it should throw an error when a field is not declared in the type but only in the resolver through ResolveField.