diff options
Diffstat (limited to 'app/graphql/types/ml/model_type.rb')
-rw-r--r-- | app/graphql/types/ml/model_type.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/types/ml/model_type.rb b/app/graphql/types/ml/model_type.rb index ca63918b370..a26d50cbdc4 100644 --- a/app/graphql/types/ml/model_type.rb +++ b/app/graphql/types/ml/model_type.rb @@ -7,10 +7,25 @@ module Types graphql_name 'MlModel' description 'Machine learning model in the model registry' + connection_type_class Types::LimitedCountableConnectionType + + present_using ::Ml::ModelPresenter + field :id, ::Types::GlobalIDType[::Ml::Model], null: false, description: 'ID of the model.' field :name, ::GraphQL::Types::String, null: false, description: 'Name of the model.' + field :created_at, Types::TimeType, null: false, description: 'Date of creation.' + + field :description, ::GraphQL::Types::String, null: false, description: 'Description of the model.' + + field :latest_version, ::Types::Ml::ModelVersionType, null: true, description: 'Latest version of the model.' + + field :version_count, ::GraphQL::Types::Int, null: true, description: 'Count of versions in the model.' + + field :_links, ::Types::Ml::ModelLinksType, null: false, method: :itself, + description: 'Map of links to perform actions on the model.' + field :versions, ::Types::Ml::ModelVersionType.connection_type, null: true, description: 'Versions of the model.' |