githubEdit

cloneTypes

GraphQL Type Definitions

This section documents the object types, interfaces, and other type definitions in the pyck GraphQL API. Understanding these types is essential for constructing and interpreting API requests and responses.

Core Types

Management Types

  • Devicearrow-up-right: Physical devices and equipment (scanners, printers, terminals)

  • Locationarrow-up-right: Physical or logical locations within facilities

  • DeviceLocationarrow-up-right: Device-to-location assignment relationships

  • DeviceUserarrow-up-right: Device-to-user assignment relationships

  • AccessPolicy: Access control policies for resource permissions

  • Company: Company/tenant entity for organizational boundaries

  • Customer: Customer entity for order fulfillment

  • DataType: JSON schema definition for entity data validation

  • Supplier: Supplier entity for procurement operations

  • Group: User groups for organizing users and roles

  • Role: Roles for role-based access control (RBAC)

  • User: User entity for authentication and authorization

  • UserProfile: Comprehensive user profile with tenant and role information

  • UserRoleTuple: Deprecated - Role assignment within a tenant (use UserTenants)

  • UserTenants: Tenant associations with role assignments for multi-tenant access

Inventory Types

Picking Types

Receiving Types

Workflow Types

File Types

  • File: Files uploaded and associated with entities

System Types

  • Event: Event schema/template for event-driven architecture

  • KeyValue: Flexible key-value store for configuration and custom data

  • PageInfo: Pagination information for connections

Common Patterns

Connection Types

Many list queries return connection types that follow the Relay connection specification:

For example, InventoryItemConnection contains InventoryItemEdge objects, each with a node (the actual InventoryItem) and a cursor for pagination.

Relationship Connections

All entity relationship fields also return Connection objects, enabling pagination, filtering, and ordering on nested relationships. For example:

See the Relay Connections Migration Guide for details on using connections for relationship fields.

Input Types

Input types are used for mutation arguments:

For example, CreateInventoryItemInput is used for the createInventoryItem mutation.

Where Types

Filter types are used for the where argument in queries:

For example, InventoryItemWhereInput allows filtering inventory items by various criteria.

OrderBy Types

Sorting types are used for the orderBy argument in queries:

For example, InventoryItemOrderByInput allows sorting inventory items by various fields.

The Data Field

Many entity types include a data field of type Map, which stores flexible attributes as JSON. This allows for entity customization without schema changes.

The structure of the data field is validated using DataTypes, which are JSON Schema definitions that can be created and managed through the API.

Last updated

Was this helpful?