2020-01-16 18:08:46 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class EnvironmentType < BaseObject
|
|
|
|
graphql_name 'Environment'
|
|
|
|
description 'Describes where code is deployed for a project'
|
|
|
|
|
|
|
|
authorize :read_environment
|
|
|
|
|
|
|
|
field :name, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'Human-readable name of the environment'
|
|
|
|
|
|
|
|
field :id, GraphQL::ID_TYPE, null: false,
|
|
|
|
description: 'ID of the environment'
|
2020-03-27 18:07:48 +00:00
|
|
|
|
|
|
|
field :state, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'State of the environment, for example: available/stopped'
|
2020-04-10 18:09:32 +00:00
|
|
|
|
|
|
|
field :metrics_dashboard, Types::Metrics::DashboardType, null: true,
|
|
|
|
description: 'Metrics dashboard schema for the environment',
|
|
|
|
resolver: Resolvers::Metrics::DashboardResolver
|
2020-01-16 18:08:46 +00:00
|
|
|
end
|
|
|
|
end
|