diff options
Diffstat (limited to 'app/graphql/types/upload_type.rb')
-rw-r--r-- | app/graphql/types/upload_type.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/graphql/types/upload_type.rb b/app/graphql/types/upload_type.rb new file mode 100644 index 00000000000..0bb7f68cdba --- /dev/null +++ b/app/graphql/types/upload_type.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Types + class UploadType < BaseObject + graphql_name 'FileUpload' + + authorize :read_upload + + field :id, Types::GlobalIDType[::Upload], + null: false, + description: 'Global ID of the upload.' + field :path, GraphQL::Types::String, + null: false, + description: 'Path of the upload.' + field :size, GraphQL::Types::Int, + null: false, + description: 'Size of the upload in bytes.' + end +end |