[GraphQL] expose file information
This commit is contained in:
parent
1146447c14
commit
422b7f37ec
9 changed files with 59 additions and 19 deletions
|
@ -28,9 +28,9 @@ module Extensions
|
|||
# This method is called if the result of the `resolve`
|
||||
# is a lazy value (e.g., a Promise – like in our case)
|
||||
def after_resolve(value:, **_rest)
|
||||
return if value.nil?
|
||||
|
||||
Rails.application.routes.url_helpers.url_for(value)
|
||||
if value&.virus_scanner&.safe? || value&.virus_scanner&.pending?
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue