Closed marcoswebmasteroficial closed 5 days ago
It's not possible, it was keep for 1.x compatibility reason and won't be supported in 2.0.
You need to implement your own code/function responsible for translating glob string into an array of resolvers classes. It may also require special tricks depending if you use some bundler or not.
Previously, you could configure resolvers as shown below:
const schema = await buildSchema({ resolvers: [path.resolve(__dirname, 'src', 'resolvers', '*.ts')], emitSchemaFile: path.resolve(__dirname, 'schema.gql') })
However, recent updates in versions and dependencies have introduced changes in how resolvers are configured, impacting the typing in type BuildSchemaOptions.
before they were
resolvers: NonEmptyArray<Function> | NonEmptyArray<string>;
Now areresolvers: NonEmptyArray<Function>;
I would like to use it as it used to be very good