Open bmbferreira opened 1 day ago
Hey is the issue fixed?
Not sure if i'm following. Why do you use autoSchemaFile
in combination with your own pre-created schema? autoSchemaFile
isn't designed to work this way - if you have your own gql files you should rather use the "schema-first" approach instead
Is there an existing issue for this?
Current behavior
Currently if
autoSchemaFile
is set and if the schema is passed as well in the configs for the factory, only the resolvers set using decorators and TypeScript classes to generate the corresponding GraphQL schema are instrumented. This happens because the wrapper functions from the autoinstrumentation library are executed before the merge of the schemas.Example:
The resolvers I have set on the schema only work when I remove the
autoSchemaFile
config.Minimum reproduction code
https://github.com/nestjs/nest/blob/master/sample/23-graphql-code-first/package.json
Steps to reproduce
autoSchemaFile
config is removed.Expected behavior
The instrumentation should only be invoked after the merge of the two schemas so all the resolve spans can be created.
Package
Other package
@nestjs/graphql
NestJS version
10.3.10
Packages versions
Node.js version
22.9.0
In which operating systems have you tested?
Other
No response