-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Hooks #1547
Comments
You can also overwrite the service and then overwrite the query methods |
|
Could you please share your whole DTO? And put it between ``` for better reading. |
|
What version are you using? FYI this repo is no longer maintained (See #1538) so you could try to use my fork to see if that one works for you. |
|
When do you expect it to be called? With one of the methods this lib creates for you for the DTO? Or did you create your own resolver? Could you also share the module file? |
Hello,
i was created hooks for CreateOne, CreateMany, UpdatedOne, UpdatedMany
but i want to make BeforeFindOne and BeforeFindMany using hooks
i dont now how to write in hooks
@Injectable() export class findByUserHook<T extends CreatedBy> implements BeforeFindOneHook<UserContext> { run( instance: FindOneArgsType, context: UserContext, ): Promise<FindOneArgsType>; async run( instance: FindOneArgsType, context: UserContext, ): Promise<FindOneArgsType> { instance.createdBy = { eq: context.req.user.id }; // error in here }
The text was updated successfully, but these errors were encountered: