githubEdit

pen-to-squareUpdate Inventory Repository

Update Inventory Repository Mutation

Updates an existing Repository object in the system with new data.

Arguments

Name
Type
Description

id

ID!

The unique identifier of the repository to update

input

UpdateRepositoryInput!

Input data for updating the repository

Return Type

InventoryRepositoryOutput - Contains the updated repository and any related workflows.

Input Fields

UpdateRepositoryInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID to associate with the repository

clearDataTypeID

Boolean

Clear the existing data type ID

dataTypeSlug

String

Optional data type slug

clearDataTypeSlug

Boolean

Clear the existing data type slug

data

Map

Custom data associated with the repository

clearData

Boolean

Clear the existing custom data

locationID

UUID

Location ID

clearLocationID

Boolean

Clear the location ID

name

String

Name of the repository

layout

String

Layout configuration for the repository

clearLayout

Boolean

Clear the existing layout configuration

type

RepositoryType

Type of repository (dynamic or static)

parentID

ID

ID of the parent repository (edge reference)

clearParent

Boolean

Clear the parent repository association

addChildIDs

[ID!]

IDs of child repositories to add

removeChildIDs

[ID!]

IDs of child repositories to remove

clearChildren

Boolean

Clear all child repository associations

addItemMovementToRepositoryIDs

[ID!]

IDs of item movements (incoming) to add

removeItemMovementToRepositoryIDs

[ID!]

IDs of item movements (incoming) to remove

clearItemMovementToRepositories

Boolean

Clear all incoming item movements

addItemMovementFromRepositoryIDs

[ID!]

IDs of item movements (outgoing) to add

removeItemMovementFromRepositoryIDs

[ID!]

IDs of item movements (outgoing) to remove

clearItemMovementFromRepositories

Boolean

Clear all outgoing item movements

addRepositoryMovementToRepositoryIDs

[ID!]

IDs of repository movements (incoming) to add

removeRepositoryMovementToRepositoryIDs

[ID!]

IDs of repository movements (incoming) to remove

Return Fields

InventoryRepositoryOutput:

Field
Type
Description

inventoryRepository

Repository

The updated repository

workflows

[TemporalWorkflow]

Related workflow instances that were triggered

Repository Types

Common repository types include:

  • warehouse - Main storage facility

  • zone - Area within a warehouse

  • aisle - Row within a zone

  • shelf - Storage shelf

  • bin - Individual storage container

  • staging - Temporary staging area

  • dock - Loading/unloading area

Usage Example

JavaScript Example

Breaking Changes

The following breaking changes were introduced in this version:

  1. parentID field type changed: The parentID field changed from UUID to ID (edge reference).

  2. clearParentID renamed to clearParent: The field to clear the parent association has been renamed from clearParentID to clearParent.

  3. New child management fields: Added addChildIDs, removeChildIDs, and clearChildren fields for managing child repository relationships.

Usage Example: Managing Parent-Child Relationships

Set a Parent Repository

Clear Parent Association

Add Child Repositories

Remove Child Repositories

Important Notes

  • Hierarchy Changes: Updating the parentID changes the repository's position in the storage hierarchy

  • Layout Updates: Changing the layout may affect how items are organized within the repository

  • Workflow Triggers: Updates may trigger workflows for capacity planning or reorganization

  • Movement Associations: Be careful when modifying movement associations as it affects inventory tracking

  • Data Validation: The system validates that repository configurations are consistent with business rules

  • Child Management: Use addChildIDs and removeChildIDs to manage child repositories. Using clearChildren will disassociate all child repositories.

Last updated

Was this helpful?