nuwave / lighthouse

A framework for serving GraphQL from Laravel
https://lighthouse-php.com
MIT License
3.33k stars 434 forks source link

Add directives to mutate multiple models at once #2578

Closed spawnia closed 5 days ago

spawnia commented 6 days ago

Resolves https://github.com/nuwave/lighthouse/issues/2091

Changes

Adds the directives @createMany, @updateMany and @upsertMany. They correspond to @create, @update and @upsert, but operate on multiple models at once.

Breaking changes

No explitly public API changed, but MutationExecutorDirective splits into OneModelMutationDirective and ManyModelMutationDirective.