Custom Directive for storing UploadedFile using Spatie Media Library #2614
Unanswered
daniel-de-wit
asked this question in
Q&A
Replies: 1 comment
-
Look into https://lighthouse-php.com/master/custom-directives/input-value-directives.html#argresolver. |
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
-
I'm trying to accomplish the following scenario for Lighthouse v5:
I wish for the custom directive to receive the
UploadedFile
after validation and store it on the root eloquent model. Something like this:Last but not least, I need the argument to be dropped before passing it to the Update resolver since the Model does not expect an image property to be passed.
So far I attempted to duplicate the logic used by
@drop
which is actually applied by the relatedDropArgsDirective
which needs to be defined in thefield_middleware
, FYI.I find it difficult to figure out how to solve my issue using Lighthouse.
Beta Was this translation helpful? Give feedback.
All reactions