Welcome to mirror list, hosted at ThFree Co, Russian Federation.

detailed_import_status_type.rb « projects « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9cba176e097f577e7b1432bc58821d47e7c7cad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true

module Types
  module Projects
    class DetailedImportStatusType < BaseObject
      graphql_name 'DetailedImportStatus'
      description 'Details of the import status of a project.'

      authorize :read_project

      field :id, ::Types::GlobalIDType[::ProjectImportState],
        description: 'ID of the import state.'

      field :status, GraphQL::Types::String,
        description: 'Current status of the import.'

      field :url, GraphQL::Types::String,
        description: 'Import url.'

      field :last_error, GraphQL::Types::String,
        description: 'Last error of the import.',
        null: true,
        authorize: :read_import_error

      field :last_update_at, Types::TimeType,
        description: 'Time of the last update.'

      field :last_update_started_at, Types::TimeType,
        description: 'Time of the start of the last update.'

      field :last_successful_update_at, Types::TimeType,
        description: 'Time of the last successful update.'

      def url
        object.project.safe_import_url
      end
    end
  end
end