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 mutation node for publish regions #1453

Open sudan45 opened 5 months ago

sudan45 commented 5 months ago

Problem Statement

The current publish regions feature uses a REST API, but you need it to work with a GraphQL mutation.

Acceptance Criteria

The publish regions feature should function using a GraphQL mutation for creating organizations.

Additional Information

Rest Framework urls

method: POST
url: /api/v1/regions/<region:ID>/publish/
request payload: {}
response:{
    "id": ID,
    "modifiedAt": Datetime,
    "modifiedBy": ID,
    "createdByName": str,
    "modifiedByName": str,
    "versionId": ID,
    "adminLevels": [
        {
            "id": ID,
            "title": str,
            "level": int,
            "nameProp":str,
            "codeProp": str,
            "parentNameProp": str,
            "parentCodeProp": str
        }
    ],
    "isPublished": bool,
    "createdAt": datetime,
    "code": str,
    "title": str,
    "public": bool,
    "cacheIndex": int,
    "createdBy": ID
}
sudan45 commented 5 months ago

PR : https://github.com/the-deep/server/pull/1472