Open mentamarindos opened 4 years ago
My initial impression is that this feature is unnecessary and quite complicated to fit in with existing functionality in Lighthouse. See https://github.com/nuwave/lighthouse/blob/master/src/Schema/Directives/UpdateDirective.php
Directive resolvers are meant to be useful abstractions for common use cases, not necessarily cover every use case ever. You can just create a resolver class through:
php artisan lighthouse:mutation UpdateCheckList
Alternatively, a custom directive might also be useful:
php artisan lighthouse:directive MassUpdateDirective
Yep, that's what I've been doing, I create a custom resolver but it would be nice if Lighthouse implemented it by default :) Thanks for your response :+1:
You can create your own directive that does this for you. write it once, use it twice or even thrice. Lighthouse is very flexible and extensible, just for usecases like yours. You could even make your directives into a composer package for sharing.
What problem does this feature proposal attempt to solve?
Update multiple records
I've try it but throws the error: