Inject a dynamic value into InputType #929
Unanswered
abdelrazzaq-dev
asked this question in
Q&A
Replies: 1 comment
-
There's no injecting magic. All you can do is to create a custom parameter decorator that will extract current user data from the context, so you can merge it with your args and pass to the inner layers (like service). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I need to track who create what across many entities, is there any way to inject for example a createdBy property into the input type dynamically so I don't have to add it, manually when creating new data, especially when the object is a sub-document array which needs to iterate over all entries.
Beta Was this translation helpful? Give feedback.
All reactions