the-deep / server

Server for DEEP
https://app.thedeep.io/
GNU Affero General Public License v3.0
9 stars 3 forks source link

Analysis Framework: Implement graphql mutation node for Clone Analysis framework #1476

Open susilnem opened 3 months ago

susilnem commented 3 months ago

Problem Statement

The 'Clone analysis framework' features uses a Rest API.

Acceptance Criteria

The 'Clone analysis framework ' feature works with a graphql mutation.

Existing

ApiView: https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/analysis_framework/views.py#L88-L135

Used Serializer: https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/analysis_framework/serializers.py#L173-L300

Additional Information

Rest Framework urls

method: POST
url: /api/v1/clone-analysis-framework/3/
request payload:{"title":"New framework test (cloned)2","description":"New framework testing"}
response: {
    "id" :int,
    "title": str,
    "description":str,
}

Purposed

type CloneAnalysisFramework {
  errors: [GenericScalar!]
  ok: Boolean
  result: AnalysisFrameworkDetailType
}

input AnalysisFrameworkCloneInputType {
  title: String!
  description: String
  project: Int
}