the-deep / server

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

Implement graphql query for AnalysisFramework Roles #1473

Open sudan45 opened 3 months ago

sudan45 commented 3 months ago

Problem Statement

The 'AnalysisFramework roles' features uses a Rest API.

Acceptance Criteria

The 'AnalysisFramework roles' feature works with a graphql mutation.

Additional Information

serializers

https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/analysis_framework/serializers.py#L104-L110

views

https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/analysis_framework/views.py#L189-L208

test case

https://github.com/the-deep/server/blob/bbfdef24fa80f04a046cca7f957297adc534ba15/apps/analysis_framework/tests/test_roles_api.py#L11-L77

Rest Framework urls 
method: POST
url: api/v1/public-framework-roles/

response: {
    "count": int,
    "next": null,
    "previous": null,
    "results":{
           "id": ID,
            "title": str,
            "isPrivateRole": bool,
            "type": str,
            "canAddUser": bool,
            "canCloneFramework": bool,
            "canEditFramework": bool,
            "canUseInOtherProjects": bool,
            "isDefaultRole": boll
}
}