Is your feature request related to a problem? Please describe.
I have to keep a very flat file structure to use this. I would like to be able to organize modules together in subdomains to facilitate domain driven design, i.e.:
The issue with that is that the resolvers are ambiguous. They may go with the students or with the teachers. Like, It seems like it is some race condition as to which resolvers are going to get into avatar/resolvers. Moreover, the code is no longer collocated within its subdomain.
Describe the solution you'd like
I would like an option similar to that offered by the near-operation-file-preset plugin. Namely, that setting the option to true would place all resolver files inside the directory where schema.graphql is located instead of <baseOutputDir>/<moduleName>/<resolverRelativeTargetDir>.
Output should be <baseOutputDir>/**/<moduleInSubdomain>/<resolverRelativeTargetDir>
Describe alternatives you've considered
I have tried different variants of the resolverRelativeTargetDir, but they always are give a similar result.
I could have various paths in the generates object in codegen.ts, but then that takes up Maintainers time.
We just get everyone to agree on a flat file structure and make sure to namespace things. Which you kind of have to do anyway because teachers avatars and student avatars can't have the same schema type Avatar.
Is your feature request related to a problem? Please describe. I have to keep a very flat file structure to use this. I would like to be able to organize modules together in subdomains to facilitate domain driven design, i.e.:
If I have a
codegen.ts
likeThen it will generate a file structure like
The issue with that is that the resolvers are ambiguous. They may go with the
students
or with theteachers
. Like, It seems like it is some race condition as to which resolvers are going to get intoavatar/resolvers
. Moreover, the code is no longer collocated within its subdomain.Describe the solution you'd like I would like an option similar to that offered by the near-operation-file-preset plugin. Namely, that setting the option to
true
would place all resolver files inside the directory whereschema.graphql
is located instead of<baseOutputDir>/<moduleName>/<resolverRelativeTargetDir>
.Output should be
<baseOutputDir>/**/<moduleInSubdomain>/<resolverRelativeTargetDir>
Describe alternatives you've considered
resolverRelativeTargetDir
, but they always are give a similar result.generates
object incodegen.ts
, but then that takes up Maintainers time.type Avatar
.