fix(graphql): return empty array when no attachments

This commit is contained in:
Paul Chavard 2023-03-16 10:31:18 +01:00
parent 9ead0daf32
commit 4ba3c0e650
2 changed files with 26 additions and 1 deletions

View file

@ -45,7 +45,7 @@ module Extensions
else
attachment = after_resolve_attachment(value)
if options[:as] == :multiple
[attachment]
[attachment].compact
else
attachment
end