Distance Field Type

Create a Distance Field Type

mutation {
  fields(
    boardId: "6152bff8ee3a6e000130edbb"
    dto: {
     name: "Distance"
     description: "This is the distance in Kilometers between two locations"
     type: "distance"
     unique: false
     isVisibleOnTable:true
     typeData:{
    other_location_field: "616acaa1a648790001142e2f"
    location_field: "616aca5fa648790001142e2e"
  } 
}
  ) {
       id
        fieldsSecret {
            name
            description
            type
            typeData {
                other_location_field
                location_field
                field
                board
            }
            unique
        }
        nameHash
        boardId
        createdTime
        lastModifiedTime
        isVisibleOnTable
        position
    }
}
{
    "data": {
        "fields": {
            "id": "616acb34c5e26900013033e3",
            "fieldsSecret": {
                "name": "Distance",
                "description": "This is the distance in Kilometers between two locations",
                "type": "distance",
                "typeData": {
                    "other_location_field": "616acaa1a648790001142e2f",
                    "location_field": "616aca5fa648790001142e2e",
                    "field": null,
                    "board": null
                },
                "unique": false
            },
            "nameHash": "0AA6F4210BF373C95EDA00232E93CD98",
            "boardId": "6152bff8ee3a6e000130edbb",
            "createdTime": "Sat Oct 16 12:53:08 GMT 2021",
            "lastModifiedTime": null,
            "isVisibleOnTable": true,
            "position": 6
        }
    }
}

Update a Distance Field Type

mutation {
  updateFields(
    boardId: "6152bff8ee3a6e000130edbb"
    fieldId:"616acb34c5e26900013033e3"
    dto: {
     name: "Distance(Km)"
     description: "This is the distance in Kilometers between two locations"
     type: "distance"
     unique: false
     isVisibleOnTable:true
     typeData:{
    other_location_field: "616acaa1a648790001142e2f"
    location_field: "616aca5fa648790001142e2e"
  } 
}
  ) {
       id
        fieldsSecret {
            name
            description
            type
            typeData {
                other_location_field
                location_field
                field
                board
            }
            unique
        }
        nameHash
        boardId
        createdTime
        lastModifiedTime
        isVisibleOnTable
        position
    }
}
{
    "data": {
        "updateFields": {
            "id": "616acb34c5e26900013033e3",
            "fieldsSecret": {
                "name": "Distance(Km)",
                "description": "This is the distance in Kilometers between two locations",
                "type": "distance",
                "typeData": {
                    "other_location_field": "616acaa1a648790001142e2f",
                    "location_field": "616aca5fa648790001142e2e",
                    "field": null,
                    "board": null
                },
                "unique": false
            },
            "nameHash": "E8B0A947FCF2C58066000BBDFE2DAD43",
            "boardId": "6152bff8ee3a6e000130edbb",
            "createdTime": "Sat Oct 16 12:53:08 GMT 2021",
            "lastModifiedTime": "Sat Oct 16 12:59:41 GMT 2021",
            "isVisibleOnTable": true,
            "position": 6
        }
    }
}

Delete a Distance Field Type

mutation {
  deleteFields(
    boardId: "6152bff8ee3a6e000130edbb"
    fieldId: "616acb34c5e26900013033e3"
  )
}
{
    "data": {
        "deleteFields": "SUCCESS"
    }
}