strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
MIT License
391 stars 115 forks source link

fix: Delete mutation should not throw error if no objects in filterset #522

Closed keithhackbarth closed 2 months ago

keithhackbarth commented 2 months ago

Description

When running a batched delete mutation, if no objects are in the filter set, the mutation should be no-op, and an empty array should be returned. This matches the behavior of a batched update and also ensures idempotence.

Current behavior: An empty set throws an error Expected behavior: An empty set does not throw an error

Scope of change:

Types of Changes

Issues Fixed or Closed by This PR

n/a

Checklist