Skip to content

Terminal

The terminal node

Method Type Description
id ID!
pk Int
section SectionNode!
name String!
key String!
printers PrinterNodeConnection!
extraInfo JSONString
createdAt DateTime!
updatedAt DateTime!

Add a terminal

mutation (
  $sectionId: ID!
  $name: String!
  $stripeLocationId: String
){
  createTerminal(
    input: {
      sectionId: $sectionId
      name: $name
    }
  ) {
    errors
    success
    terminal {
      id
    }
  }
}
{
  "sectionId": 1,
  "productId": "Terminal 01"
}
{
    "data": {
        "createTerminal": {
            "success": true,
            "errors": null,
            "terminal": {
              "id": "U3RvcmVOb2RlOjE5"
            }
        }
    }
}

Sign in to a terminal

mutation (
  $key: String!
){
  terminalSignIn(
    input: {
      key: $key
    }
  ) {
    errors
    success
  }
}
{
  "key": "67MU4G93RRYH"
}
{
    "data": {
        "terminalSignIn": {
            "success": true,
            "errors": null
        }
    }
}

Update a terminal

mutation (
  $id: ID!
  $sectionId: ID
  $name: String
){
  updateTerminal(
    input: {
      id: $id
      sectionId: $sectionId
      name: $name
    }
  ) {
    errors
    success
    terminal {
      id
    }
  }
}
{
  "id": 1,
  "productId": "Terminal 01 - edited"
}
{
    "data": {
        "updateTerminal": {
            "success": true,
            "errors": null,
            "terminal": {
              "id": "U3RvcmVOb2RlOjE5"
            }
        }
    }
}

Delete a terminal

mutation (
  $id: ID!
){
  deleteTerminal(
    input: {
      id: $id
    }
  ) {
    errors
    success
  }
}
{
  "id": 1
}
{
    "data": {
        "deleteTerminal": {
            "success": true,
            "errors": null
        }
    }
}