Record Mutation

All operations here include creating, updating and deleting records from a board

Endpoint

https://api.quabbly.live/v1/api

Header

x-api-key : "API Key"

Arguments

Field NameValueType
fieldIdStringString
boardIdStringString
dtoRecordInputDTOObject

Create Record

Operator name: record

Create Record: Structure

mutation record ($boardId: String!, $dto: RecordInputDTO) {
    record (boardId: "$boardId", dto: $dto) {
        id
        createdTime
        lastUpdatedTime
        lastUpdatedBy
        userName
        data {
            fieldId
            value
            values
        }
    }
}

Sample Payload

mutation {
    record (boardId: "61ec86e262637c000171ae5d", dto: {metadata: 
        [{fieldId: "61efeb2615c81700011c5adf", value: "Public api" },
        {fieldId: "61f115ca87c6e40001d90c74", value: "a "},
        {fieldId: "61d115ca87c6e40001d90c75", values: ["good", "bad", "evil"]},
        {fieldId: "61s115ca87c6e40001d90c71", values: ["2022-01-20"]},
        {fieldId: "61f115ca87c6e40001d90c79", file: [{id: "61f2d08b72", name: "screen.png", size: 303961, type: "image/png"url: "https://s3.eu-wes.png"}]},
        {fieldId: "61g115ca87c6e40001d90c41", location: {address: "102273, Lagos, Nigeria", coordinates: "6.4626929, 3.3996903"},}
        {fieldId: "61h115ca87c6e40001d90c43", value: "2349032484389"}]
  }) {
        id
        createdTime
        lastUpdatedTime
        lastUpdatedBy
        userName
        data {
            fieldId
            value
            values
        }
    }
}

Sample Response

{
  "id": "61f2aca387c6e40001d90cbf",
  "createdTime": 1643293859775,
  "lastUpdatedBy": null
  "lastUpdatedTime": null
  "userName": "[email protected]"
  "data" : [
    {
      "fieldId" : "61f115ca87c6e40001d90c74",
      "value" : "a ",
      "values" : null
    },
    {
      "fieldId" : "61d115ca87c6e40001d90c75",
      "value" : null,
      "values" : ["good", "evil"]
    },
    }
      "fieldId" : "61efeb2615c81700011c5adf",
      "value" : "Public api",
      "values" : null
    }, 
    {
      "fieldId" : "61f115ca87c6e40001d90c74",
      "value" : null,
      "values" : ["2022-01-20"]
    }, 
    {
      "fieldId" : "61f115ca87c6e40001d90c79",
      "value" : "https://s3.eu-wes.png",
      "values" : null
    }, 
    {
      "fieldId" : "61g115ca87c6e40001d90c41",
      "value" : "102273, Lagos, Nigeria",
      "values" : null
    }, 
    {
      "fieldId" : "61h115ca87c6e40001d90c43",
      "value" : "09032484389",
      "values" : null
    }
  ]

Update Record

Operator name: update Record

Update Record: Structure

mutation updateRecord ($boardId: String!, $recordId: String!, $dto: RecordInputDTO) {
    updateRecord (boardId: $boardId, recordId: $recordId, dto: $dto) {
        id
        createdTime
        lastUpdatedTime
        lastUpdatedBy
        userName
        data {
            fieldId
            value
            values
        }
    }
}

Sample Payload

mutation {
    updateRecord (boardId: "61ec86e262637c000171ae5d", recordId: "61f2aca387c6e40001d90cbf" dto: {metadata: 
        [{fieldId: "61efeb2615c81700011c5adf", value: "Public api" },
        {fieldId: "61f115ca87c6e40001d90c74", value: "a "},
        {fieldId: "61d115ca87c6e40001d90c75", values: ["good", "bad", "evil"]},
        {fieldId: "61s115ca87c6e40001d90c71", values: ["2022-01-20"]},
        {fieldId: "61f115ca87c6e40001d90c79", file: [{id: "61f2d08b72", name: "screen.png", size: 303961, type: "image/png"url: "https://s3.eu-wes.png"}]},
        {fieldId: "61g115ca87c6e40001d90c41", location: {address: "102273, Lagos, Nigeria", coordinates: "6.4626929, 3.3996903"},}
        {fieldId: "61h115ca87c6e40001d90c43", value: "2349032484389"}]
  }) {
        id
        createdTime
        lastUpdatedTime
        lastUpdatedBy
        userName
        data {
            fieldId
            value
            values
        }
    }
}

Sample Response

{
  "id": "61f2aca387c6e40001d90cbf",
  "createdTime": 1643293859775,
  "lastUpdatedBy": null
  "lastUpdatedTime": null
  "userName": "[email protected]"
  "data" : [
    {
      "fieldId" : "61f115ca87c6e40001d90c74",
      "value" : "a ",
      "values" : null
    },
    {
      "fieldId" : "61d115ca87c6e40001d90c75",
      "value" : null,
      "values" : ["good", "evil"]
    },
    }
      "fieldId" : "61efeb2615c81700011c5adf",
      "value" : "Public api",
      "values" : null
    }, 
    {
      "fieldId" : "61f115ca87c6e40001d90c74",
      "value" : null,
      "values" : ["2022-01-20"]
    }, 
    {
      "fieldId" : "61f115ca87c6e40001d90c79",
      "value" : "https://s3.eu-wes.png",
      "values" : null
    }, 
    {
      "fieldId" : "61g115ca87c6e40001d90c41",
      "value" : "102273, Lagos, Nigeria",
      "values" : null
    }, 
    {
      "fieldId" : "61h115ca87c6e40001d90c43",
      "value" : "09032484389",
      "values" : null
    }
  ]
}

Delete Record

Operator name: deleteRecord

Delete Record: Structure

mutation deleteRecord ($boardId: String!, $recordId: String!) {
    deleteRecord (boardId: $boardId, recordId: $recordId)
}

Sample Payload

mutation deleteRecord ($boardId: String!, $recordId: String!) {
    deleteRecord (boardId: "61efeb2615c81700011c5adf", recordId: "61f2aca387c6e40001d90cbf")
}

Sample Response

{
    "data": {
        "deleteRecord": "SUCCESS"
    }
}