# Runs

### Create a run

```graphql
mutation CreateRun($input: CreateRunInput!) {
    createRun(input: $input) {
        run {
            id title procedureId createdById
            dueDate assignedToId description
            partInventory {
                serialNumber
            }
        }
    }
}
```

> *Mutation to create run from a procedure. This will not work if "Autogenerate run title" box is checked. if you do have it checked, simply remove "title" from the mutation block above and "title": "run title" from the Query Variables below.*

Query variables:

```graphql
{
    "input": {
        "title": "run title",
        "procedureId": 1,
        "dueDate": "2021-09-28T16:57:37",
        "partInventoryId": 2
    }
}
```
