Production Run Type
The ProductionRun type represents a production process that a tracker is associated with.
Type Definition
"""
A production run in the system.
"""
type ProductionRun {
"""
Unique identifier for the production run.
"""
id: ID!
"""
Human-readable name of the production run.
"""
name: String!
"""
Current status of the production run.
"""
status: ProductionStatus!
"""
When the production run started.
Unix timestamp in seconds.
"""
startTime: Int!
"""
When the production run ended.
Unix timestamp in seconds.
"""
endTime: Int
"""
List of trackers associated with this run.
"""
trackers: [Tracker!]!
"""
Storage location where production occurs.
"""
storageLocation: StorageLocation!
"""
Delivery location for the production.
"""
deliveryLocation: DeliveryLocation
"""
Brand associated with the production.
"""
brand: Brand!
"""
Custom metadata fields.
"""
metadata: JSONObject
}
"""
Status of a production run.
"""
enum ProductionStatus {
"""
Production run is scheduled but not started.
"""
SCHEDULED
"""
Production is in progress.
"""
IN_PROGRESS
"""
Production is temporarily paused.
"""
PAUSED
"""
Production has completed successfully.
"""
COMPLETED
"""
Production was cancelled.
"""
CANCELLED
"""
Production encountered an error.
"""
ERROR
}
Fields
ProductionRun Type
| Field | Type | Description |
|---|---|---|
id | ID! | Required. Unique identifier |
name | String! | Required. Run name |
status | ProductionStatus! | Required. Current status |
startTime | Int! | Required. Start timestamp |
endTime | Int | Optional. End timestamp |
trackers | [Tracker!]! | Required. Associated trackers |
storageLocation | StorageLocation! | Required. Production location |
deliveryLocation | DeliveryLocation | Optional. Delivery location |
brand | Brand! | Required. Associated brand |
metadata | JSONObject | Optional. Custom metadata |
Usage
Basic Query
query GetProductionRun {
productionRun(id: "run_123") {
name
status
startTime
endTime
trackers {
id
currentStatus
}
storageLocation {
name
address
}
}
}
With Delivery Information
query GetProductionWithDelivery {
productionRun(id: "run_123") {
name
status
deliveryLocation {
name
address
contactInfo {
name
phone
email
}
}
brand {
name
code
}
metadata
}
}
Best Practices
-
Status Management
- Update status promptly
- Handle transitions properly
- Log status changes
-
Tracker Association
- Validate tracker availability
- Handle tracker reassignment
- Monitor tracker status
-
Location Handling
- Validate addresses
- Update delivery info
- Track location changes
-
Metadata Usage
- Document metadata schema
- Include relevant details
- Keep data organized