diff --git a/strawberry/permission.py b/strawberry/permission.py index b52fdce102..47a4c0a94f 100644 --- a/strawberry/permission.py +++ b/strawberry/permission.py @@ -158,9 +158,12 @@ def __init__( def apply(self, field: StrawberryField) -> None: """Applies all of the permission directives to the schema and sets up silent permissions.""" if self.use_directives: - field.directives.extend( - p.schema_directive for p in self.permissions if p.schema_directive - ) + # Dedupe multiple directives + # https://github.com/strawberry-graphql/strawberry/issues/3596 + permission_directives = {p.schema_directive for p in self.permissions if p.schema_directive} + existing_field_directives = set(field.directives) + extend_directives = permission_directives - existing_field_directives + field.directives.extend(extend_directives) # We can only fail silently if the field is optional or a list if self.fail_silently: if isinstance(field.type, StrawberryOptional):