lablup / lablup/backend.ai

Refactor ModifyAgent mutation to use adapter pattern

Open
#7,598 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Objective

Simplify the ModifyAgent GraphQL mutation resolver by applying the adapter pattern, making it a thin layer that delegates to the service layer.

## Current Issues

- GraphQL resolver contains business logic
- Direct coupling to registry and database operations
- Difficult to test in isolation

## Implementation Scope

- Refactor ModifyAgent.mutate() to use ActionProcessor pattern
- Transform GraphQL input (ModifyAgentInput) to service Action
- Transform service ActionResult to GraphQL response
- Delegate business logic to AgentService (from BA-3571)

## Dependencies

- Requires BA-3571 to be completed first

## Expected Outcome

ModifyAgent resolver becomes a thin adapter layer, following the same pattern as other modern GraphQL mutations in the codebase.

JIRA Issue: BA-3572

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.