Mutations
GraphQL Mutations
This section documents all available mutations in the pyck GraphQL API. Mutations allow you to create, update, and delete data in the system.
Available Mutations
Management Service
Device Management
createDevice: Create a new device (scanner, printer, terminal)
updateDevice: Update an existing device
deleteDevice: Delete a device from the system
checkInUserDevice: Assign a device to a user
checkOutUserDevice: Return a device from a user
Location Management
createLocation: Create a new warehouse location
updateLocation: Update an existing location
deleteLocation: Delete a location from the system
setDeviceLocation: Assign a device to a location
unsetDeviceLocation: Remove a device from a location
Customer & Supplier Management
createCustomer: Create a new customer entity
updateCustomer: Update an existing customer with new data
deleteCustomer: Delete an existing customer from the system
createSupplier: Create a new supplier entity
updateSupplier: Update an existing supplier with new data
deleteSupplier: Delete an existing supplier from the system
Data Types & Configuration
createDataType: Create a new data type definition
updateDataType: Update an existing data type definition with new data
deleteDataType: Delete an existing data type definition from the system
generateJsonSchema: Generate a JSON Schema definition from provided JSON data
System Management
registerCompany: Register a new company in the pyck system along with an initial admin user
registerTenant: Register a new tenant (organization) in the pyck system along with an initial admin user
sendCustomEvent: Send a custom event to the pyck event system
Inventory Service
createInventoryItem: Create a new inventory item
updateInventoryItem: Update an existing inventory item with new data
deleteInventoryItem: Delete an existing inventory item from the system
createInventoryItemSet: Create a new inventory item set for grouping related items
updateInventoryItemSet: Update an existing inventory item set with new data
deleteInventoryItemSet: Delete an existing inventory item set from the system
createInventoryCollectionMovement: Create a collection of related movements
updateInventoryCollectionMovement: Update an existing inventory collection movement with new data
createInventoryItemMovement: Create a movement to transfer items between repositories
updateItemMovement: Update an existing item movement with new data
deleteItemMovement: Delete an existing item movement from the system
executeItemMovement: Execute a pending movement
createRepository: Create a new storage location
updateRepository: Update an existing repository with new data
deleteInventoryRepository: Delete an existing repository from the system
updateRepositoryMovement: Update an existing repository movement with new data
deleteRepositoryMovement: Delete an existing repository movement from the system
Picking Service
createPickingOrder: Create a new picking order
updatePickingOrder: Update an existing picking order with new data
deletePickingOrder: Delete an existing picking order from the system
createPickingOrderItem: Create a new picking order item and associate it with an existing picking order
updatePickingOrderItem: Update an existing picking order item with new data
deletePickingOrderItem: Delete an existing picking order item from the system
Receiving Service
createReceivingInbound: Create a new inbound receiving order
updateReceivingInbound: Update an existing receiving inbound with new data
deleteReceivingInbound: Delete an existing receiving inbound from the system
createReceivingInboundItem: Create a new receiving inbound item and associate it with an existing receiving order
updateReceivingInboundItem: Update an existing receiving inbound item with new data
deleteReceivingInboundItem: Delete an existing receiving inbound item from the system
Workflow Service
createWorkflow: Create a new workflow definition
updateWorkflow: Update an existing workflow definition with new data
deleteWorkflow: Delete an existing workflow definition from the system
createWorkflowSignal: Create a new workflow signal event handler
updateWorkflowSignal: Update an existing workflow signal with new data
deleteWorkflowSignal: Delete an existing workflow signal from the system
checkWorkflowStatus: Check the status of a running workflow instance
setAssignee: Set or update the assignee for a running workflow instance
File Service
createFile: Upload and associate files with entities
updateFile: Update an existing file with new data
deleteFile: Delete an existing file from the system
analyzeImageFile: Analyze an image file using AI/ML services
Mutation Structure
Mutations in GraphQL follow a standard structure:
Working with Mutations
Input Types
Most mutations use dedicated input types to specify the data for the operation. For example, the createInventoryItem mutation uses the CreateInventoryItemInput type.
Return Types
Mutations typically return the affected entity, allowing you to retrieve updated values in the same operation.
Error Handling
Mutations may return errors for various reasons:
Invalid input data
Insufficient permissions
Conflicts with existing data
Business rule violations
Refer to the Error Handling documentation for more information on handling errors.
Example Mutation
Here's an example of creating a new inventory item:
Last updated
Was this helpful?
