Closed coupster74 closed 6 months ago
I have bit of trouble understanding, but noticed the following:
When extending the CrudResolver
you should not use the same one with resolvers
inside the module, but use dtos
instead, see here for more info
Also note that when doing NestjsQueryTypeOrmModule.forFeature
you can provide multiple entities at once:
NestjsQueryTypeOrmModule.forFeature([entityOne, entityTwo])
Might be a newby question, but I've been fighting with this for a while and didn't see any documentation on the best approach, or if it is even possible.
I have two modules, action, which represents and entity, and clean up which performs clean up functions (like merging a related dimension) for many entities, including action.
In action, I wanted to use soft deletes, so I implemented an ActionService and ActionResolver which extends the CRUDResolver as below:
with the following module definition:
In the clean up module, I have been importing the dynamic .forFeature as show below.
and was importing into the resolver via:
with my custom ActionService, this causes an issue where there are multiple DeleteResponse types for Action:
I'm assuming this is because both my ActionModule and now the CleanUpModule are both declaring the same types for Action and that the best approach to resolve this is to import the ActionModule into the CleanUpModule so that the ActionService is still usable? Or is this a defect? It's interesting it isn't complaining about other types (but perhaps this is just the first one)?
I can't seem to explicitly export ActionService from the ActionModule, nor does below work in CleanUpModule
as it results in: