diff options
Diffstat (limited to 'app/graphql/types/ml/model_version_type.rb')
-rw-r--r-- | app/graphql/types/ml/model_version_type.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/graphql/types/ml/model_version_type.rb b/app/graphql/types/ml/model_version_type.rb new file mode 100644 index 00000000000..15c36a7a0d8 --- /dev/null +++ b/app/graphql/types/ml/model_version_type.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Types + module Ml + # rubocop: disable Graphql/AuthorizeTypes -- authorization in ModelDetailsResolver + class ModelVersionType < ::Types::BaseObject + graphql_name 'MlModelVersion' + description 'Version of a machine learning model' + + connection_type_class Types::LimitedCountableConnectionType + + field :id, ::Types::GlobalIDType[::Ml::ModelVersion], null: false, description: 'ID of the model version.' + + field :created_at, Types::TimeType, null: false, description: 'Date of creation.' + field :version, ::GraphQL::Types::String, null: false, description: 'Name of the version.' + + field :_links, ::Types::Ml::ModelVersionLinksType, null: false, method: :itself, + description: 'Map of links to perform actions on the model version.' + end + # rubocop: enable Graphql/AuthorizeTypes + end +end |