githubEdit

square-plusCreate Inventory Repository

createInventoryRepository Mutation

Creates a new Repository in the inventory system.

Arguments

Name
Type
Description

input

CreateRepositoryInput!

Input data for creating the repository

Return Type

InventoryRepositoryOutput - Contains the created repository and any associated workflows.

Input Fields

CreateRepositoryInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID

dataTypeSlug

String

Optional data type slug

data

Map

Custom data associated with the repository

locationID

UUID

Optional location ID

name

String!

Required name of the repository

layout

String

Optional layout information for the repository

type

RepositoryType!

Required type of the repository (dynamic or static)

virtualRepo

Boolean

Whether this is a virtual repository (non-physical location)

parentID

ID

Optional parent repository ID (edge reference) for hierarchical structures

childIDs

[ID!]

Optional array of child repository IDs to associate

itemmovementtorepositoryIDs

[ID!]

Optional item movement IDs (incoming)

itemmovementfromrepositoryIDs

[ID!]

Optional item movement IDs (outgoing)

repositorymovementtorepositoryIDs

[ID!]

Optional repository movement IDs (incoming)

repositorymovementfromrepositoryIDs

[ID!]

Optional repository movement IDs (outgoing)

repositorymovementrepositoryIDs

[ID!]

Optional repository movement IDs

repositorytransactionIDs

[ID!]

Optional transaction IDs

repositorystockIDs

[ID!]

Optional stock IDs

Breaking Changes

The parentID field type has changed from UUID to ID. This is an edge reference field that establishes a parent-child relationship between repositories. If you were previously passing a UUID string, you should now pass the repository's GraphQL ID.

Additionally, a new childIDs field has been added to allow specifying child repositories during creation.

Usage Example

Create a Child Repository

Create Repository with Children

Last updated

Was this helpful?