Alternative to glob for finding resolvers #1600
Replies: 1 comment 5 replies
-
The "trick" which was done internally was to call It's not built-in anymore and users/consumers are required to provide a logic for that because this dummy solution with require does not work with bundlers and others, polluting global metadata storage, so some feature like multiple schemas build with no leaks were not possible. I think I will do a basic example for 80% of cases in the migration guide doc. |
Beta Was this translation helpful? Give feedback.
-
Hello there. I see that since the new beta versions, there is a different way to pass the resolvers to build the schema.
In our usecase, we have a complex structure with a lot of dirs and subdirs and this is how we are used to build the schema:
We have our resolvers defined on this type of pattern:
['./**/queries/*.ts', './**/mutations/*.ts', './**/subscriptions/*.ts', './**/types/*.resolver.ts']
Is there an easy way to do the kind of glob we were doing, or do we need to start adding
index
files on all these folders for exporting all the modules just for passing it on theresolvers
prop now?Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions