githubEdit

buildingRepository

Repository Type

Audience: Programmer

Represents a storage location in the warehouse system. Repositories can be anything that holds goods - from entire warehouses down to individual bins or movable containers like pallets.

Fields

Field
Type
Description

id

ID!

Unique identifier of the repository

tenantID

UUID!

Tenant identifier

createdAt

Time!

Creation timestamp

createdBy

UUID!

User identifier who created the repository

updatedAt

Time

Last update timestamp

updatedBy

UUID

User identifier who last updated the repository

deletedAt

Time

Deletion timestamp

deletedBy

UUID

User identifier who deleted the repository

dataTypeID

UUID

Data type identifier

dataTypeSlug

String

Data type slug

data

Map

Custom data associated with the repository

parentID

ID

Edge reference ID to the parent repository (null for root repositories)

locationID

UUID

Optional reference to a Location entity for geographic/logical grouping

name

String!

Name of the repository

layout

String

Layout configuration

type

RepositoryType!

Type (static or dynamic)

virtualRepo

Boolean!

Whether this is a virtual repository

Connection Fields

All relationship fields return Connection objects that support pagination, filtering, and ordering.

Field
Connection Type
Description

parent

Repository

Parent repository in the hierarchy (resolved from parentID)

children

RepositoryConnection!

Child repositories in the hierarchy

itemMovementToRepositories

ItemMovementConnection!

Item movements where this repository is the destination

itemMovementFromRepositories

ItemMovementConnection!

Item movements where this repository is the source

repositoryMovementToRepositories

RepositoryMovementConnection!

Repository movements where this is the destination

repositoryMovementFromRepositories

RepositoryMovementConnection!

Repository movements where this is the source

repositoryMovementRepositories

RepositoryMovementConnection!

Repository movements for this repository

repositoryTransactions

TransactionConnection!

Transaction records for this repository

repositoryStocks

StockConnection!

Stock records in this repository

Connection Arguments

Each connection field accepts the following arguments:

Argument
Type
Description

after

Cursor

Returns elements after this cursor

first

Int

Returns the first n elements

before

Cursor

Returns elements before this cursor

last

Int

Returns the last n elements

orderBy

*Order

Ordering options (specific to each connection)

where

*WhereInput

Filtering options (specific to each connection)

Interfaces

  • Node

Repository Types

  • Static Repository: Fixed locations like warehouses, zones, shelves, bins

  • Dynamic Repository: Movable containers like pallets, totes, trolleys, forklifts

Virtual Repositories

Virtual repositories allow stock to be allocated without validation. They're used at warehouse boundaries:

  • Incoming goods (supplier deliveries)

  • Outgoing shipments (customer orders)

  • Adjustments (damaged, stolen, corrections)

Location Association

The optional locationID field allows repositories to be associated with a Location entity. This enables:

  • Geographic grouping of repositories by physical location

  • Multi-site warehouse management

  • Location-based access control and reporting

  • Integration with the location management system

When set, the repository is logically associated with the specified location, enabling queries and workflows to filter repositories by their physical or logical location.

Usage Example

Query Root Repositories with Children

Query Repositories with Parent Filtering

Query Repositories with Children Filtering

Query Repository with Item Movements

Query Repositories by Location

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). This reflects the change from a direct UUID field to a proper GraphQL edge relationship.

  2. New edge predicates: Use hasParent, hasParentWith, hasChildren, and hasChildrenWith for filtering instead of direct parentID comparisons.

  3. Removed filters: The following parentID filters have been removed:

    • parentIDGT

    • parentIDGTE

    • parentIDLT

    • parentIDLTE

Notes

  • Root-level repositories (parentID = null) typically represent warehouses

  • The actual purpose (warehouse, shelf, bin, etc.) is determined by naming and hierarchy

  • Virtual repositories don't enforce stock validation for movements

  • Dynamic repositories can change parents via repository movements

  • Use hasParent: false to find root repositories instead of parentIDIsNil: true

  • The locationID field enables location-based grouping and filtering of repositories

New Fields (2025-01)

circle-info

New Field: locationID (UUID, optional) - Associates the repository with a Location entity for geographic/logical grouping. This enables multi-site warehouse management and location-based filtering.

Last updated

Was this helpful?