Craftplan

GraphQL Reference

Craftplan exposes a GraphQL API at /api/graphql. All requests require a Bearer token; generate one in Settings → API Keys (tokens use the cpk_ prefix).

Craftplan GraphQL API

GraphQL API for Craftplan ERP. All requests require a Bearer token — generate one in Settings → API Keys (tokens use the cpk_ prefix).

Contact

Craftplan

API Endpoints
http://localhost:4000/api/graphql

Queries

getBom

Response

Returns a Bom

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getBom($id: ID!) {
  getBom(id: $id) {
    id
    name
    notes
    status
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "getBom": {
      "id": 4,
      "name": "xyz789",
      "notes": "xyz789",
      "status": "xyz789"
    }
  }
}

getBomComponent

Response

Returns a BomComponent

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getBomComponent($id: ID!) {
  getBomComponent(id: $id) {
    id
  }
}
Variables
{"id": "4"}
Response
{"data": {"getBomComponent": {"id": 4}}}

getCustomer

Response

Returns a Customer

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getCustomer($id: ID!) {
  getCustomer(id: $id) {
    id
    type
    firstName
    lastName
    email
    phone
    billingAddress
    shippingAddress
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "getCustomer": {
      "id": "4",
      "type": "xyz789",
      "firstName": "xyz789",
      "lastName": "xyz789",
      "email": "abc123",
      "phone": "xyz789",
      "billingAddress": JsonString,
      "shippingAddress": JsonString
    }
  }
}

getLot

Response

Returns a Lot

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getLot($id: ID!) {
  getLot(id: $id) {
    id
  }
}
Variables
{"id": "4"}
Response
{"data": {"getLot": {"id": 4}}}

getMaterial

Response

Returns a Material

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getMaterial($id: ID!) {
  getMaterial(id: $id) {
    id
    name
    sku
    unit
    price
    minimumStock
    maximumStock
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "getMaterial": {
      "id": "4",
      "name": "abc123",
      "sku": "xyz789",
      "unit": "xyz789",
      "price": Decimal,
      "minimumStock": Decimal,
      "maximumStock": Decimal
    }
  }
}

getMovement

Response

Returns a Movement

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getMovement($id: ID!) {
  getMovement(id: $id) {
    id
  }
}
Variables
{"id": 4}
Response
{"data": {"getMovement": {"id": "4"}}}

getOrder

Response

Returns an Order

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getOrder($id: ID!) {
  getOrder(id: $id) {
    id
  }
}
Variables
{"id": "4"}
Response
{"data": {"getOrder": {"id": 4}}}

getOrderItem

Response

Returns an OrderItem

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getOrderItem($id: ID!) {
  getOrderItem(id: $id) {
    id
  }
}
Variables
{"id": 4}
Response
{"data": {"getOrderItem": {"id": "4"}}}

getProduct

Response

Returns a Product

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getProduct($id: ID!) {
  getProduct(id: $id) {
    id
    name
    status
    price
    photos
    featuredPhoto
    sellingAvailability
    maxDailyQuantity
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "getProduct": {
      "id": "4",
      "name": "xyz789",
      "status": "abc123",
      "price": Decimal,
      "photos": ["xyz789"],
      "featuredPhoto": "xyz789",
      "sellingAvailability": "xyz789",
      "maxDailyQuantity": 987
    }
  }
}

getProductionBatch

Response

Returns a ProductionBatch

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getProductionBatch($id: ID!) {
  getProductionBatch(id: $id) {
    id
  }
}
Variables
{"id": 4}
Response
{"data": {"getProductionBatch": {"id": 4}}}

getPurchaseOrder

Response

Returns a PurchaseOrder

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getPurchaseOrder($id: ID!) {
  getPurchaseOrder(id: $id) {
    id
  }
}
Variables
{"id": 4}
Response
{"data": {"getPurchaseOrder": {"id": 4}}}

getSupplier

Response

Returns a Supplier

Arguments
Name Description
id - ID! The id of the record

Example

Query
query getSupplier($id: ID!) {
  getSupplier(id: $id) {
    id
  }
}
Variables
{"id": 4}
Response
{"data": {"getSupplier": {"id": 4}}}

listBomComponents

Response

Returns a KeysetPageOfBomComponent

Arguments
Name Description
sort - [BomComponentSortInput] How to sort the records in the response
filter - BomComponentFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listBomComponents(
  $sort: [BomComponentSortInput],
  $filter: BomComponentFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listBomComponents(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...BomComponentFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [BomComponentSortInput],
  "filter": BomComponentFilterInput,
  "first": 123,
  "before": "xyz789",
  "after": "abc123",
  "last": 123
}
Response
{
  "data": {
    "listBomComponents": {
      "count": 123,
      "results": [BomComponent],
      "startKeyset": "abc123",
      "endKeyset": "abc123"
    }
  }
}

listBoms

Response

Returns [Bom!]!

Arguments
Name Description
sort - [BomSortInput] How to sort the records in the response
filter - BomFilterInput A filter to limit the results
productId - ID!

Example

Query
query listBoms(
  $sort: [BomSortInput],
  $filter: BomFilterInput,
  $productId: ID!
) {
  listBoms(
    sort: $sort,
    filter: $filter,
    productId: $productId
  ) {
    id
    name
    notes
    status
  }
}
Variables
{
  "sort": [BomSortInput],
  "filter": BomFilterInput,
  "productId": "4"
}
Response
{
  "data": {
    "listBoms": [
      {
        "id": 4,
        "name": "xyz789",
        "notes": "xyz789",
        "status": "xyz789"
      }
    ]
  }
}

listCustomers

Response

Returns a KeysetPageOfCustomer

Arguments
Name Description
sort - [CustomerSortInput] How to sort the records in the response
filter - CustomerFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listCustomers(
  $sort: [CustomerSortInput],
  $filter: CustomerFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listCustomers(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...CustomerFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [CustomerSortInput],
  "filter": CustomerFilterInput,
  "first": 123,
  "before": "abc123",
  "after": "abc123",
  "last": 987
}
Response
{
  "data": {
    "listCustomers": {
      "count": 987,
      "results": [Customer],
      "startKeyset": "xyz789",
      "endKeyset": "xyz789"
    }
  }
}

listLots

Response

Returns a KeysetPageOfLot

Arguments
Name Description
sort - [LotSortInput] How to sort the records in the response
filter - LotFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listLots(
  $sort: [LotSortInput],
  $filter: LotFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listLots(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...LotFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [LotSortInput],
  "filter": LotFilterInput,
  "first": 123,
  "before": "abc123",
  "after": "xyz789",
  "last": 123
}
Response
{
  "data": {
    "listLots": {
      "count": 123,
      "results": [Lot],
      "startKeyset": "abc123",
      "endKeyset": "abc123"
    }
  }
}

listMaterials

Response

Returns a KeysetPageOfMaterial

Arguments
Name Description
sort - [MaterialSortInput] How to sort the records in the response
filter - MaterialFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listMaterials(
  $sort: [MaterialSortInput],
  $filter: MaterialFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listMaterials(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...MaterialFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [MaterialSortInput],
  "filter": MaterialFilterInput,
  "first": 987,
  "before": "abc123",
  "after": "abc123",
  "last": 123
}
Response
{
  "data": {
    "listMaterials": {
      "count": 123,
      "results": [Material],
      "startKeyset": "abc123",
      "endKeyset": "abc123"
    }
  }
}

listMovements

Response

Returns a KeysetPageOfMovement

Arguments
Name Description
sort - [MovementSortInput] How to sort the records in the response
filter - MovementFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listMovements(
  $sort: [MovementSortInput],
  $filter: MovementFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listMovements(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...MovementFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [MovementSortInput],
  "filter": MovementFilterInput,
  "first": 123,
  "before": "abc123",
  "after": "abc123",
  "last": 123
}
Response
{
  "data": {
    "listMovements": {
      "count": 987,
      "results": [Movement],
      "startKeyset": "abc123",
      "endKeyset": "xyz789"
    }
  }
}

listOrderItems

Response

Returns a KeysetPageOfOrderItem

Arguments
Name Description
sort - [OrderItemSortInput] How to sort the records in the response
filter - OrderItemFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listOrderItems(
  $sort: [OrderItemSortInput],
  $filter: OrderItemFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listOrderItems(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...OrderItemFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [OrderItemSortInput],
  "filter": OrderItemFilterInput,
  "first": 123,
  "before": "abc123",
  "after": "abc123",
  "last": 123
}
Response
{
  "data": {
    "listOrderItems": {
      "count": 987,
      "results": [OrderItem],
      "startKeyset": "abc123",
      "endKeyset": "xyz789"
    }
  }
}

listOrders

Response

Returns a KeysetPageOfOrder

Arguments
Name Description
sort - [OrderSortInput] How to sort the records in the response
filter - OrderFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250
status - [String!]
paymentStatus - [String!]
deliveryDateStart - DateTime
deliveryDateEnd - DateTime
customerName - String
productId - ID

Example

Query
query listOrders(
  $sort: [OrderSortInput],
  $filter: OrderFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int,
  $status: [String!],
  $paymentStatus: [String!],
  $deliveryDateStart: DateTime,
  $deliveryDateEnd: DateTime,
  $customerName: String,
  $productId: ID
) {
  listOrders(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last,
    status: $status,
    paymentStatus: $paymentStatus,
    deliveryDateStart: $deliveryDateStart,
    deliveryDateEnd: $deliveryDateEnd,
    customerName: $customerName,
    productId: $productId
  ) {
    count
    results {
      ...OrderFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [OrderSortInput],
  "filter": OrderFilterInput,
  "first": 123,
  "before": "abc123",
  "after": "abc123",
  "last": 123,
  "status": ["xyz789"],
  "paymentStatus": ["xyz789"],
  "deliveryDateStart": "2007-12-03T10:15:30Z",
  "deliveryDateEnd": "2007-12-03T10:15:30Z",
  "customerName": "abc123",
  "productId": 4
}
Response
{
  "data": {
    "listOrders": {
      "count": 987,
      "results": [Order],
      "startKeyset": "abc123",
      "endKeyset": "abc123"
    }
  }
}

listProductionBatches

Response

Returns a KeysetPageOfProductionBatch

Arguments
Name Description
sort - [ProductionBatchSortInput] How to sort the records in the response
filter - ProductionBatchFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250

Example

Query
query listProductionBatches(
  $sort: [ProductionBatchSortInput],
  $filter: ProductionBatchFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int
) {
  listProductionBatches(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last
  ) {
    count
    results {
      ...ProductionBatchFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [ProductionBatchSortInput],
  "filter": ProductionBatchFilterInput,
  "first": 987,
  "before": "xyz789",
  "after": "abc123",
  "last": 123
}
Response
{
  "data": {
    "listProductionBatches": {
      "count": 987,
      "results": [ProductionBatch],
      "startKeyset": "abc123",
      "endKeyset": "xyz789"
    }
  }
}

listProducts

Response

Returns a KeysetPageOfProduct

Arguments
Name Description
sort - [ProductSortInput] How to sort the records in the response
filter - ProductFilterInput A filter to limit the results
first - Int The number of records to return from the beginning. Maximum 250
before - String Show records before the specified keyset.
after - String Show records after the specified keyset.
last - Int The number of records to return to the end. Maximum 250
status - [String!]

Example

Query
query listProducts(
  $sort: [ProductSortInput],
  $filter: ProductFilterInput,
  $first: Int,
  $before: String,
  $after: String,
  $last: Int,
  $status: [String!]
) {
  listProducts(
    sort: $sort,
    filter: $filter,
    first: $first,
    before: $before,
    after: $after,
    last: $last,
    status: $status
  ) {
    count
    results {
      ...ProductFragment
    }
    startKeyset
    endKeyset
  }
}
Variables
{
  "sort": [ProductSortInput],
  "filter": ProductFilterInput,
  "first": 987,
  "before": "abc123",
  "after": "abc123",
  "last": 987,
  "status": ["xyz789"]
}
Response
{
  "data": {
    "listProducts": {
      "count": 987,
      "results": [Product],
      "startKeyset": "abc123",
      "endKeyset": "abc123"
    }
  }
}

listPurchaseOrders

Response

Returns [PurchaseOrder!]!

Arguments
Name Description
sort - [PurchaseOrderSortInput] How to sort the records in the response
filter - PurchaseOrderFilterInput A filter to limit the results

Example

Query
query listPurchaseOrders(
  $sort: [PurchaseOrderSortInput],
  $filter: PurchaseOrderFilterInput
) {
  listPurchaseOrders(
    sort: $sort,
    filter: $filter
  ) {
    id
  }
}
Variables
{
  "sort": [PurchaseOrderSortInput],
  "filter": PurchaseOrderFilterInput
}
Response
{"data": {"listPurchaseOrders": [{"id": 4}]}}

listSuppliers

Response

Returns [Supplier!]!

Arguments
Name Description
sort - [SupplierSortInput] How to sort the records in the response
filter - SupplierFilterInput A filter to limit the results

Example

Query
query listSuppliers(
  $sort: [SupplierSortInput],
  $filter: SupplierFilterInput
) {
  listSuppliers(
    sort: $sort,
    filter: $filter
  ) {
    id
  }
}
Variables
{
  "sort": [SupplierSortInput],
  "filter": SupplierFilterInput
}
Response
{"data": {"listSuppliers": [{"id": 4}]}}

Mutations

createCustomer

Response

Returns a CreateCustomerResult!

Arguments
Name Description
input - CreateCustomerInput!

Example

Query
mutation createCustomer($input: CreateCustomerInput!) {
  createCustomer(input: $input) {
    result {
      ...CustomerFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateCustomerInput}
Response
{
  "data": {
    "createCustomer": {
      "result": Customer,
      "errors": [MutationError]
    }
  }
}

createMaterial

Response

Returns a CreateMaterialResult!

Arguments
Name Description
input - CreateMaterialInput!

Example

Query
mutation createMaterial($input: CreateMaterialInput!) {
  createMaterial(input: $input) {
    result {
      ...MaterialFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateMaterialInput}
Response
{
  "data": {
    "createMaterial": {
      "result": Material,
      "errors": [MutationError]
    }
  }
}

createOrder

Response

Returns a CreateOrderResult!

Arguments
Name Description
input - CreateOrderInput!

Example

Query
mutation createOrder($input: CreateOrderInput!) {
  createOrder(input: $input) {
    result {
      ...OrderFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateOrderInput}
Response
{
  "data": {
    "createOrder": {
      "result": Order,
      "errors": [MutationError]
    }
  }
}

createOrderItem

Response

Returns a CreateOrderItemResult!

Arguments
Name Description
input - CreateOrderItemInput!

Example

Query
mutation createOrderItem($input: CreateOrderItemInput!) {
  createOrderItem(input: $input) {
    result {
      ...OrderItemFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateOrderItemInput}
Response
{
  "data": {
    "createOrderItem": {
      "result": OrderItem,
      "errors": [MutationError]
    }
  }
}

createProduct

Response

Returns a CreateProductResult!

Arguments
Name Description
input - CreateProductInput!

Example

Query
mutation createProduct($input: CreateProductInput!) {
  createProduct(input: $input) {
    result {
      ...ProductFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateProductInput}
Response
{
  "data": {
    "createProduct": {
      "result": Product,
      "errors": [MutationError]
    }
  }
}

createPurchaseOrder

Response

Returns a CreatePurchaseOrderResult!

Arguments
Name Description
input - CreatePurchaseOrderInput!

Example

Query
mutation createPurchaseOrder($input: CreatePurchaseOrderInput!) {
  createPurchaseOrder(input: $input) {
    result {
      ...PurchaseOrderFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreatePurchaseOrderInput}
Response
{
  "data": {
    "createPurchaseOrder": {
      "result": PurchaseOrder,
      "errors": [MutationError]
    }
  }
}

createSupplier

Response

Returns a CreateSupplierResult!

Arguments
Name Description
input - CreateSupplierInput!

Example

Query
mutation createSupplier($input: CreateSupplierInput!) {
  createSupplier(input: $input) {
    result {
      ...SupplierFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"input": CreateSupplierInput}
Response
{
  "data": {
    "createSupplier": {
      "result": Supplier,
      "errors": [MutationError]
    }
  }
}

destroyCustomer

Response

Returns a DestroyCustomerResult!

Arguments
Name Description
id - ID!

Example

Query
mutation destroyCustomer($id: ID!) {
  destroyCustomer(id: $id) {
    result {
      ...CustomerFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "destroyCustomer": {
      "result": Customer,
      "errors": [MutationError]
    }
  }
}

destroyProduct

Response

Returns a DestroyProductResult!

Arguments
Name Description
id - ID!

Example

Query
mutation destroyProduct($id: ID!) {
  destroyProduct(id: $id) {
    result {
      ...ProductFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "destroyProduct": {
      "result": Product,
      "errors": [MutationError]
    }
  }
}

updateCustomer

Response

Returns an UpdateCustomerResult!

Arguments
Name Description
id - ID!
input - UpdateCustomerInput

Example

Query
mutation updateCustomer(
  $id: ID!,
  $input: UpdateCustomerInput
) {
  updateCustomer(
    id: $id,
    input: $input
  ) {
    result {
      ...CustomerFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": 4, "input": UpdateCustomerInput}
Response
{
  "data": {
    "updateCustomer": {
      "result": Customer,
      "errors": [MutationError]
    }
  }
}

updateMaterial

Response

Returns an UpdateMaterialResult!

Arguments
Name Description
id - ID!
input - UpdateMaterialInput

Example

Query
mutation updateMaterial(
  $id: ID!,
  $input: UpdateMaterialInput
) {
  updateMaterial(
    id: $id,
    input: $input
  ) {
    result {
      ...MaterialFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": 4, "input": UpdateMaterialInput}
Response
{
  "data": {
    "updateMaterial": {
      "result": Material,
      "errors": [MutationError]
    }
  }
}

updateOrder

Response

Returns an UpdateOrderResult!

Arguments
Name Description
id - ID!
input - UpdateOrderInput

Example

Query
mutation updateOrder(
  $id: ID!,
  $input: UpdateOrderInput
) {
  updateOrder(
    id: $id,
    input: $input
  ) {
    result {
      ...OrderFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": 4, "input": UpdateOrderInput}
Response
{
  "data": {
    "updateOrder": {
      "result": Order,
      "errors": [MutationError]
    }
  }
}

updateOrderItem

Response

Returns an UpdateOrderItemResult!

Arguments
Name Description
id - ID!
input - UpdateOrderItemInput

Example

Query
mutation updateOrderItem(
  $id: ID!,
  $input: UpdateOrderItemInput
) {
  updateOrderItem(
    id: $id,
    input: $input
  ) {
    result {
      ...OrderItemFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{
  "id": "4",
  "input": UpdateOrderItemInput
}
Response
{
  "data": {
    "updateOrderItem": {
      "result": OrderItem,
      "errors": [MutationError]
    }
  }
}

updateProduct

Response

Returns an UpdateProductResult!

Arguments
Name Description
id - ID!
input - UpdateProductInput

Example

Query
mutation updateProduct(
  $id: ID!,
  $input: UpdateProductInput
) {
  updateProduct(
    id: $id,
    input: $input
  ) {
    result {
      ...ProductFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{"id": 4, "input": UpdateProductInput}
Response
{
  "data": {
    "updateProduct": {
      "result": Product,
      "errors": [MutationError]
    }
  }
}

updatePurchaseOrder

Response

Returns an UpdatePurchaseOrderResult!

Arguments
Name Description
id - ID!
input - UpdatePurchaseOrderInput

Example

Query
mutation updatePurchaseOrder(
  $id: ID!,
  $input: UpdatePurchaseOrderInput
) {
  updatePurchaseOrder(
    id: $id,
    input: $input
  ) {
    result {
      ...PurchaseOrderFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{
  "id": "4",
  "input": UpdatePurchaseOrderInput
}
Response
{
  "data": {
    "updatePurchaseOrder": {
      "result": PurchaseOrder,
      "errors": [MutationError]
    }
  }
}

updateSupplier

Response

Returns an UpdateSupplierResult!

Arguments
Name Description
id - ID!
input - UpdateSupplierInput

Example

Query
mutation updateSupplier(
  $id: ID!,
  $input: UpdateSupplierInput
) {
  updateSupplier(
    id: $id,
    input: $input
  ) {
    result {
      ...SupplierFragment
    }
    errors {
      ...MutationErrorFragment
    }
  }
}
Variables
{
  "id": "4",
  "input": UpdateSupplierInput
}
Response
{
  "data": {
    "updateSupplier": {
      "result": Supplier,
      "errors": [MutationError]
    }
  }
}

Types

Bom

Fields
Field Name Description
id - ID!
name - String
notes - String
status - String!
Example
{
  "id": "4",
  "name": "xyz789",
  "notes": "abc123",
  "status": "abc123"
}

BomComponent

Fields
Field Name Description
id - ID!
Example
{"id": "4"}

BomComponentFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": false,
  "eq": 4,
  "notEq": "4",
  "in": ["4"],
  "lessThan": "4",
  "greaterThan": 4,
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": "4"
}

BomComponentFilterInput

Example
{
  "and": [BomComponentFilterInput],
  "or": [BomComponentFilterInput],
  "not": [BomComponentFilterInput],
  "id": BomComponentFilterId
}

BomComponentSortField

Values
Enum Value Description

ID

Example
"ID"

BomComponentSortInput

Fields
Input Field Description
order - SortOrder
field - BomComponentSortField!
Example
{"order": "DESC", "field": "ID"}

BomFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": 4,
  "notEq": 4,
  "in": [4],
  "lessThan": 4,
  "greaterThan": 4,
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": 4
}

BomFilterInput

Fields
Input Field Description
and - [BomFilterInput!]
or - [BomFilterInput!]
not - [BomFilterInput!]
id - BomFilterId
name - BomFilterName
notes - BomFilterNotes
status - BomFilterStatus
Example
{
  "and": [BomFilterInput],
  "or": [BomFilterInput],
  "not": [BomFilterInput],
  "id": BomFilterId,
  "name": BomFilterName,
  "notes": BomFilterNotes,
  "status": BomFilterStatus
}

BomFilterName

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "xyz789",
  "in": ["abc123"],
  "lessThan": "abc123",
  "greaterThan": "abc123",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "abc123",
  "like": "xyz789",
  "ilike": "abc123"
}

BomFilterNotes

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "xyz789",
  "greaterThan": "abc123",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "xyz789",
  "like": "abc123",
  "ilike": "xyz789"
}

BomFilterStatus

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
Example
{
  "isNil": true,
  "eq": "abc123",
  "notEq": "abc123",
  "in": ["xyz789"],
  "lessThan": "xyz789",
  "greaterThan": "abc123",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123"
}

BomSortField

Values
Enum Value Description

ID

NAME

NOTES

STATUS

Example
"ID"

BomSortInput

Fields
Input Field Description
order - SortOrder
field - BomSortField!
Example
{"order": "DESC", "field": "ID"}

Boolean

Description

The Boolean scalar type represents true or false.

CreateCustomerInput

Fields
Input Field Description
type - String!
firstName - String!
lastName - String!
email - String
phone - String
billingAddress - JsonString
shippingAddress - JsonString
Example
{
  "type": "xyz789",
  "firstName": "abc123",
  "lastName": "abc123",
  "email": "xyz789",
  "phone": "xyz789",
  "billingAddress": JsonString,
  "shippingAddress": JsonString
}

CreateCustomerResult

Description

The result of the :create_customer mutation

Fields
Field Name Description
result - Customer The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Customer,
  "errors": [MutationError]
}

CreateMaterialInput

Fields
Input Field Description
name - String!
sku - String!
unit - String!
price - Decimal!
minimumStock - Decimal
maximumStock - Decimal
Example
{
  "name": "abc123",
  "sku": "xyz789",
  "unit": "xyz789",
  "price": Decimal,
  "minimumStock": Decimal,
  "maximumStock": Decimal
}

CreateMaterialResult

Description

The result of the :create_material mutation

Fields
Field Name Description
result - Material The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Material,
  "errors": [MutationError]
}

CreateOrderInput

Fields
Input Field Description
deliveryDate - DateTime!
invoiceNumber - String
invoiceStatus - String
invoicedAt - DateTime
paymentMethod - String
discountType - String
discountValue - Decimal
deliveryMethod - String
status - String
customerId - ID!
items - [OrderCreateItemsInput!]
Example
{
  "deliveryDate": "2007-12-03T10:15:30Z",
  "invoiceNumber": "abc123",
  "invoiceStatus": "xyz789",
  "invoicedAt": "2007-12-03T10:15:30Z",
  "paymentMethod": "xyz789",
  "discountType": "xyz789",
  "discountValue": Decimal,
  "deliveryMethod": "abc123",
  "status": "abc123",
  "customerId": "4",
  "items": [OrderCreateItemsInput]
}

CreateOrderItemInput

Fields
Input Field Description
unitPrice - Decimal!
quantity - Decimal!
status - String
productId - ID!
Example
{
  "unitPrice": Decimal,
  "quantity": Decimal,
  "status": "xyz789",
  "productId": 4
}

CreateOrderItemResult

Description

The result of the :create_order_item mutation

Fields
Field Name Description
result - OrderItem The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": OrderItem,
  "errors": [MutationError]
}

CreateOrderResult

Description

The result of the :create_order mutation

Fields
Field Name Description
result - Order The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Order,
  "errors": [MutationError]
}

CreateProductInput

Fields
Input Field Description
name - String!
status - String
price - Decimal!
sku - String!
photos - [String!] Array of photo URLs for the product
featuredPhoto - String ID or reference to the featured photo from the photos array
sellingAvailability - String Customer-facing availability: available, preorder, or off
maxDailyQuantity - Int Optional per-product capacity per day (0 = unlimited)
Example
{
  "name": "abc123",
  "status": "abc123",
  "price": Decimal,
  "sku": "abc123",
  "photos": ["xyz789"],
  "featuredPhoto": "abc123",
  "sellingAvailability": "xyz789",
  "maxDailyQuantity": 987
}

CreateProductResult

Description

The result of the :create_product mutation

Fields
Field Name Description
result - Product The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Product,
  "errors": [MutationError]
}

CreatePurchaseOrderInput

Fields
Input Field Description
status - String
orderedAt - DateTime
supplierId - ID!
Example
{
  "status": "abc123",
  "orderedAt": "2007-12-03T10:15:30Z",
  "supplierId": "4"
}

CreatePurchaseOrderResult

Description

The result of the :create_purchase_order mutation

Fields
Field Name Description
result - PurchaseOrder The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": PurchaseOrder,
  "errors": [MutationError]
}

CreateSupplierInput

Fields
Input Field Description
name - String!
contactName - String
contactEmail - String
contactPhone - String
notes - String
Example
{
  "name": "abc123",
  "contactName": "xyz789",
  "contactEmail": "xyz789",
  "contactPhone": "xyz789",
  "notes": "abc123"
}

CreateSupplierResult

Description

The result of the :create_supplier mutation

Fields
Field Name Description
result - Supplier The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Supplier,
  "errors": [MutationError]
}

Customer

Fields
Field Name Description
id - ID!
type - String!
firstName - String!
lastName - String!
email - String
phone - String
billingAddress - JsonString
shippingAddress - JsonString
Example
{
  "id": 4,
  "type": "abc123",
  "firstName": "abc123",
  "lastName": "abc123",
  "email": "xyz789",
  "phone": "abc123",
  "billingAddress": JsonString,
  "shippingAddress": JsonString
}

CustomerFilterEmail

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": true,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "xyz789",
  "like": "abc123",
  "ilike": "abc123"
}

CustomerFilterFirstName

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": true,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "xyz789",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "xyz789",
  "like": "xyz789",
  "ilike": "abc123"
}

CustomerFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": "4",
  "notEq": "4",
  "in": ["4"],
  "lessThan": "4",
  "greaterThan": "4",
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": "4"
}

CustomerFilterInput

Example
{
  "and": [CustomerFilterInput],
  "or": [CustomerFilterInput],
  "not": [CustomerFilterInput],
  "id": CustomerFilterId,
  "type": CustomerFilterType,
  "firstName": CustomerFilterFirstName,
  "lastName": CustomerFilterLastName,
  "email": CustomerFilterEmail,
  "phone": CustomerFilterPhone
}

CustomerFilterLastName

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "xyz789",
  "like": "xyz789",
  "ilike": "abc123"
}

CustomerFilterPhone

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "xyz789",
  "in": ["abc123"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123",
  "like": "abc123",
  "ilike": "xyz789"
}

CustomerFilterType

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "xyz789",
  "in": ["abc123"],
  "lessThan": "xyz789",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "xyz789"
}

CustomerSortField

Values
Enum Value Description

ID

TYPE

FIRST_NAME

LAST_NAME

EMAIL

PHONE

Example
"ID"

CustomerSortInput

Fields
Input Field Description
order - SortOrder
field - CustomerSortField!
Example
{"order": "DESC", "field": "ID"}

DateTime

Description

The DateTime scalar type represents a date and time in the UTC timezone. The DateTime appears in a JSON response as an ISO8601 formatted string, including UTC timezone ("Z"). The parsed date and time string will be converted to UTC if there is an offset.

Example
"2007-12-03T10:15:30Z"

Decimal

Description

The Decimal scalar type represents signed double-precision fractional values parsed by the Decimal library. The Decimal appears in a JSON response as a string to preserve precision.

Example
Decimal

DestroyCustomerResult

Description

The result of the :destroy_customer mutation

Fields
Field Name Description
result - Customer The record that was successfully deleted
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Customer,
  "errors": [MutationError]
}

DestroyProductResult

Description

The result of the :destroy_product mutation

Fields
Field Name Description
result - Product The record that was successfully deleted
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Product,
  "errors": [MutationError]
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Json

Description

The Json scalar type represents arbitrary json string data, represented as UTF-8 character sequences. The Json type is most often used to represent a free-form human-readable json string.

Example
Json

JsonString

Description

The Json scalar type represents arbitrary json string data, represented as UTF-8 character sequences. The Json type is most often used to represent a free-form human-readable json string.

Example
JsonString

KeysetPageOfBomComponent

Description

A keyset page of :bom_component

Fields
Field Name Description
count - Int Total count on all pages
results - [BomComponent!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 123,
  "results": [BomComponent],
  "startKeyset": "xyz789",
  "endKeyset": "abc123"
}

KeysetPageOfCustomer

Description

A keyset page of :customer

Fields
Field Name Description
count - Int Total count on all pages
results - [Customer!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 987,
  "results": [Customer],
  "startKeyset": "xyz789",
  "endKeyset": "xyz789"
}

KeysetPageOfLot

Description

A keyset page of :lot

Fields
Field Name Description
count - Int Total count on all pages
results - [Lot!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 123,
  "results": [Lot],
  "startKeyset": "xyz789",
  "endKeyset": "abc123"
}

KeysetPageOfMaterial

Description

A keyset page of :material

Fields
Field Name Description
count - Int Total count on all pages
results - [Material!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 987,
  "results": [Material],
  "startKeyset": "abc123",
  "endKeyset": "xyz789"
}

KeysetPageOfMovement

Description

A keyset page of :movement

Fields
Field Name Description
count - Int Total count on all pages
results - [Movement!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 987,
  "results": [Movement],
  "startKeyset": "abc123",
  "endKeyset": "abc123"
}

KeysetPageOfOrder

Description

A keyset page of :order

Fields
Field Name Description
count - Int Total count on all pages
results - [Order!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 123,
  "results": [Order],
  "startKeyset": "abc123",
  "endKeyset": "abc123"
}

KeysetPageOfOrderItem

Description

A keyset page of :order_item

Fields
Field Name Description
count - Int Total count on all pages
results - [OrderItem!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 123,
  "results": [OrderItem],
  "startKeyset": "xyz789",
  "endKeyset": "xyz789"
}

KeysetPageOfProduct

Description

A keyset page of :product

Fields
Field Name Description
count - Int Total count on all pages
results - [Product!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 987,
  "results": [Product],
  "startKeyset": "xyz789",
  "endKeyset": "abc123"
}

KeysetPageOfProductionBatch

Description

A keyset page of :production_batch

Fields
Field Name Description
count - Int Total count on all pages
results - [ProductionBatch!] The records contained in the page
startKeyset - String The first keyset in the results
endKeyset - String The last keyset in the results
Example
{
  "count": 987,
  "results": [ProductionBatch],
  "startKeyset": "xyz789",
  "endKeyset": "xyz789"
}

Lot

Fields
Field Name Description
id - ID!
Example
{"id": "4"}

LotFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": false,
  "eq": "4",
  "notEq": 4,
  "in": [4],
  "lessThan": "4",
  "greaterThan": 4,
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": 4
}

LotFilterInput

Fields
Input Field Description
and - [LotFilterInput!]
or - [LotFilterInput!]
not - [LotFilterInput!]
id - LotFilterId
Example
{
  "and": [LotFilterInput],
  "or": [LotFilterInput],
  "not": [LotFilterInput],
  "id": LotFilterId
}

LotSortField

Values
Enum Value Description

ID

Example
"ID"

LotSortInput

Fields
Input Field Description
order - SortOrder
field - LotSortField!
Example
{"order": "DESC", "field": "ID"}

Material

Fields
Field Name Description
id - ID!
name - String!
sku - String!
unit - String!
price - Decimal!
minimumStock - Decimal
maximumStock - Decimal
Example
{
  "id": "4",
  "name": "xyz789",
  "sku": "abc123",
  "unit": "abc123",
  "price": Decimal,
  "minimumStock": Decimal,
  "maximumStock": Decimal
}

MaterialFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": 4,
  "notEq": "4",
  "in": ["4"],
  "lessThan": 4,
  "greaterThan": "4",
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": 4
}

MaterialFilterInput

Example
{
  "and": [MaterialFilterInput],
  "or": [MaterialFilterInput],
  "not": [MaterialFilterInput],
  "id": MaterialFilterId,
  "name": MaterialFilterName,
  "sku": MaterialFilterSku,
  "unit": MaterialFilterUnit,
  "price": MaterialFilterPrice,
  "minimumStock": MaterialFilterMinimumStock,
  "maximumStock": MaterialFilterMaximumStock
}

MaterialFilterMaximumStock

Fields
Input Field Description
isNil - Boolean
eq - Decimal
notEq - Decimal
in - [Decimal]
lessThan - Decimal
greaterThan - Decimal
lessThanOrEqual - Decimal
greaterThanOrEqual - Decimal
Example
{
  "isNil": false,
  "eq": Decimal,
  "notEq": Decimal,
  "in": [Decimal],
  "lessThan": Decimal,
  "greaterThan": Decimal,
  "lessThanOrEqual": Decimal,
  "greaterThanOrEqual": Decimal
}

MaterialFilterMinimumStock

Fields
Input Field Description
isNil - Boolean
eq - Decimal
notEq - Decimal
in - [Decimal]
lessThan - Decimal
greaterThan - Decimal
lessThanOrEqual - Decimal
greaterThanOrEqual - Decimal
Example
{
  "isNil": false,
  "eq": Decimal,
  "notEq": Decimal,
  "in": [Decimal],
  "lessThan": Decimal,
  "greaterThan": Decimal,
  "lessThanOrEqual": Decimal,
  "greaterThanOrEqual": Decimal
}

MaterialFilterName

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "xyz789",
  "in": ["abc123"],
  "lessThan": "xyz789",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "xyz789",
  "like": "abc123",
  "ilike": "xyz789"
}

MaterialFilterPrice

Fields
Input Field Description
isNil - Boolean
eq - Decimal
notEq - Decimal
in - [Decimal!]
lessThan - Decimal
greaterThan - Decimal
lessThanOrEqual - Decimal
greaterThanOrEqual - Decimal
Example
{
  "isNil": false,
  "eq": Decimal,
  "notEq": Decimal,
  "in": [Decimal],
  "lessThan": Decimal,
  "greaterThan": Decimal,
  "lessThanOrEqual": Decimal,
  "greaterThanOrEqual": Decimal
}

MaterialFilterSku

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": true,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "abc123",
  "greaterThanOrEqual": "xyz789",
  "like": "abc123",
  "ilike": "xyz789"
}

MaterialFilterUnit

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
Example
{
  "isNil": false,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "xyz789"
}

MaterialSortField

Values
Enum Value Description

ID

NAME

SKU

UNIT

PRICE

MINIMUM_STOCK

MAXIMUM_STOCK

Example
"ID"

MaterialSortInput

Fields
Input Field Description
order - SortOrder
field - MaterialSortField!
Example
{"order": "DESC", "field": "ID"}

Movement

Fields
Field Name Description
id - ID!
Example
{"id": 4}

MovementFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": "4",
  "notEq": 4,
  "in": [4],
  "lessThan": "4",
  "greaterThan": "4",
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": 4
}

MovementFilterInput

Fields
Input Field Description
and - [MovementFilterInput!]
or - [MovementFilterInput!]
not - [MovementFilterInput!]
id - MovementFilterId
Example
{
  "and": [MovementFilterInput],
  "or": [MovementFilterInput],
  "not": [MovementFilterInput],
  "id": MovementFilterId
}

MovementSortField

Values
Enum Value Description

ID

Example
"ID"

MovementSortInput

Fields
Input Field Description
order - SortOrder
field - MovementSortField!
Example
{"order": "DESC", "field": "ID"}

MutationError

Description

An error generated by a failed mutation

Fields
Field Name Description
message - String The human readable error message
shortMessage - String A shorter error message, with vars not replaced
vars - Json Replacements for the short message
code - String An error code for the given error
fields - [String!] The field or fields that produced the error
Example
{
  "message": "xyz789",
  "shortMessage": "xyz789",
  "vars": Json,
  "code": "xyz789",
  "fields": ["abc123"]
}

Order

Fields
Field Name Description
id - ID!
Example
{"id": 4}

OrderCreateItemsInput

Fields
Input Field Description
id - ID
status - String
quantity - Decimal
productId - ID
laborCost - Decimal Labor cost allocated to this order item during batch completion
materialCost - Decimal Material cost allocated to this order item during batch completion
overheadCost - Decimal Overhead cost allocated to this order item during batch completion
unitCost - Decimal Per-unit production cost captured at batch completion
unitPrice - Decimal
consumedAt - DateTime Timestamp indicating materials were consumed for this item
Example
{
  "id": "4",
  "status": "xyz789",
  "quantity": Decimal,
  "productId": 4,
  "laborCost": Decimal,
  "materialCost": Decimal,
  "overheadCost": Decimal,
  "unitCost": Decimal,
  "unitPrice": Decimal,
  "consumedAt": "2007-12-03T10:15:30Z"
}

OrderFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": false,
  "eq": "4",
  "notEq": "4",
  "in": ["4"],
  "lessThan": 4,
  "greaterThan": 4,
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": "4"
}

OrderFilterInput

Fields
Input Field Description
and - [OrderFilterInput!]
or - [OrderFilterInput!]
not - [OrderFilterInput!]
id - OrderFilterId
Example
{
  "and": [OrderFilterInput],
  "or": [OrderFilterInput],
  "not": [OrderFilterInput],
  "id": OrderFilterId
}

OrderItem

Fields
Field Name Description
id - ID!
Example
{"id": 4}

OrderItemFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": "4",
  "notEq": 4,
  "in": ["4"],
  "lessThan": "4",
  "greaterThan": "4",
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": 4
}

OrderItemFilterInput

Fields
Input Field Description
and - [OrderItemFilterInput!]
or - [OrderItemFilterInput!]
not - [OrderItemFilterInput!]
id - OrderItemFilterId
Example
{
  "and": [OrderItemFilterInput],
  "or": [OrderItemFilterInput],
  "not": [OrderItemFilterInput],
  "id": OrderItemFilterId
}

OrderItemSortField

Values
Enum Value Description

ID

Example
"ID"

OrderItemSortInput

Fields
Input Field Description
order - SortOrder
field - OrderItemSortField!
Example
{"order": "DESC", "field": "ID"}

OrderSortField

Values
Enum Value Description

ID

Example
"ID"

OrderSortInput

Fields
Input Field Description
order - SortOrder
field - OrderSortField!
Example
{"order": "DESC", "field": "ID"}

OrderUpdateItemsInput

Fields
Input Field Description
id - ID
status - String
quantity - Decimal
productId - ID
laborCost - Decimal Labor cost allocated to this order item during batch completion
materialCost - Decimal Material cost allocated to this order item during batch completion
overheadCost - Decimal Overhead cost allocated to this order item during batch completion
unitCost - Decimal Per-unit production cost captured at batch completion
unitPrice - Decimal
consumedAt - DateTime Timestamp indicating materials were consumed for this item
Example
{
  "id": 4,
  "status": "xyz789",
  "quantity": Decimal,
  "productId": 4,
  "laborCost": Decimal,
  "materialCost": Decimal,
  "overheadCost": Decimal,
  "unitCost": Decimal,
  "unitPrice": Decimal,
  "consumedAt": "2007-12-03T10:15:30Z"
}

Product

Fields
Field Name Description
id - ID!
name - String!
status - String!
price - Decimal!
photos - [String!] Array of photo URLs for the product
featuredPhoto - String ID or reference to the featured photo from the photos array
sellingAvailability - String! Customer-facing availability: available, preorder, or off
maxDailyQuantity - Int! Optional per-product capacity per day (0 = unlimited)
Example
{
  "id": 4,
  "name": "xyz789",
  "status": "abc123",
  "price": Decimal,
  "photos": ["abc123"],
  "featuredPhoto": "xyz789",
  "sellingAvailability": "xyz789",
  "maxDailyQuantity": 987
}

ProductFilterFeaturedPhoto

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["abc123"],
  "lessThan": "abc123",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123",
  "like": "abc123",
  "ilike": "xyz789"
}

ProductFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": 4,
  "notEq": 4,
  "in": ["4"],
  "lessThan": 4,
  "greaterThan": 4,
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": 4
}

ProductFilterInput

Fields
Input Field Description
and - [ProductFilterInput!]
or - [ProductFilterInput!]
not - [ProductFilterInput!]
id - ProductFilterId
name - ProductFilterName
status - ProductFilterStatus
price - ProductFilterPrice
featuredPhoto - ProductFilterFeaturedPhoto ID or reference to the featured photo from the photos array
sellingAvailability - ProductFilterSellingAvailability Customer-facing availability: available, preorder, or off
maxDailyQuantity - ProductFilterMaxDailyQuantity Optional per-product capacity per day (0 = unlimited)
Example
{
  "and": [ProductFilterInput],
  "or": [ProductFilterInput],
  "not": [ProductFilterInput],
  "id": ProductFilterId,
  "name": ProductFilterName,
  "status": ProductFilterStatus,
  "price": ProductFilterPrice,
  "featuredPhoto": ProductFilterFeaturedPhoto,
  "sellingAvailability": ProductFilterSellingAvailability,
  "maxDailyQuantity": ProductFilterMaxDailyQuantity
}

ProductFilterMaxDailyQuantity

Fields
Input Field Description
isNil - Boolean
eq - Int
notEq - Int
in - [Int!]
lessThan - Int
greaterThan - Int
lessThanOrEqual - Int
greaterThanOrEqual - Int
Example
{
  "isNil": true,
  "eq": 123,
  "notEq": 987,
  "in": [987],
  "lessThan": 123,
  "greaterThan": 123,
  "lessThanOrEqual": 123,
  "greaterThanOrEqual": 987
}

ProductFilterName

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
like - String
ilike - String
Example
{
  "isNil": false,
  "eq": "xyz789",
  "notEq": "abc123",
  "in": ["abc123"],
  "lessThan": "xyz789",
  "greaterThan": "abc123",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123",
  "like": "xyz789",
  "ilike": "xyz789"
}

ProductFilterPrice

Fields
Input Field Description
isNil - Boolean
eq - Decimal
notEq - Decimal
in - [Decimal!]
lessThan - Decimal
greaterThan - Decimal
lessThanOrEqual - Decimal
greaterThanOrEqual - Decimal
Example
{
  "isNil": false,
  "eq": Decimal,
  "notEq": Decimal,
  "in": [Decimal],
  "lessThan": Decimal,
  "greaterThan": Decimal,
  "lessThanOrEqual": Decimal,
  "greaterThanOrEqual": Decimal
}

ProductFilterSellingAvailability

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
Example
{
  "isNil": true,
  "eq": "xyz789",
  "notEq": "abc123",
  "in": ["xyz789"],
  "lessThan": "abc123",
  "greaterThan": "abc123",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123"
}

ProductFilterStatus

Fields
Input Field Description
isNil - Boolean
eq - String
notEq - String
in - [String!]
lessThan - String
greaterThan - String
lessThanOrEqual - String
greaterThanOrEqual - String
Example
{
  "isNil": true,
  "eq": "abc123",
  "notEq": "xyz789",
  "in": ["xyz789"],
  "lessThan": "xyz789",
  "greaterThan": "xyz789",
  "lessThanOrEqual": "xyz789",
  "greaterThanOrEqual": "abc123"
}

ProductSortField

Values
Enum Value Description

ID

NAME

STATUS

PRICE

FEATURED_PHOTO

SELLING_AVAILABILITY

MAX_DAILY_QUANTITY

Example
"ID"

ProductSortInput

Fields
Input Field Description
order - SortOrder
field - ProductSortField!
Example
{"order": "DESC", "field": "ID"}

ProductionBatch

Fields
Field Name Description
id - ID!
Example
{"id": 4}

ProductionBatchFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": false,
  "eq": 4,
  "notEq": 4,
  "in": ["4"],
  "lessThan": "4",
  "greaterThan": "4",
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": "4"
}

ProductionBatchFilterInput

Example
{
  "and": [ProductionBatchFilterInput],
  "or": [ProductionBatchFilterInput],
  "not": [ProductionBatchFilterInput],
  "id": ProductionBatchFilterId
}

ProductionBatchSortField

Values
Enum Value Description

ID

Example
"ID"

ProductionBatchSortInput

Fields
Input Field Description
order - SortOrder
field - ProductionBatchSortField!
Example
{"order": "DESC", "field": "ID"}

PurchaseOrder

Fields
Field Name Description
id - ID!
Example
{"id": 4}

PurchaseOrderFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": true,
  "eq": "4",
  "notEq": 4,
  "in": ["4"],
  "lessThan": 4,
  "greaterThan": 4,
  "lessThanOrEqual": "4",
  "greaterThanOrEqual": 4
}

PurchaseOrderFilterInput

Example
{
  "and": [PurchaseOrderFilterInput],
  "or": [PurchaseOrderFilterInput],
  "not": [PurchaseOrderFilterInput],
  "id": PurchaseOrderFilterId
}

PurchaseOrderSortField

Values
Enum Value Description

ID

Example
"ID"

PurchaseOrderSortInput

Fields
Input Field Description
order - SortOrder
field - PurchaseOrderSortField!
Example
{"order": "DESC", "field": "ID"}

SortOrder

Values
Enum Value Description

DESC

DESC_NULLS_FIRST

DESC_NULLS_LAST

ASC

ASC_NULLS_FIRST

ASC_NULLS_LAST

Example
"DESC"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

Supplier

Fields
Field Name Description
id - ID!
Example
{"id": 4}

SupplierFilterId

Fields
Input Field Description
isNil - Boolean
eq - ID
notEq - ID
in - [ID!]
lessThan - ID
greaterThan - ID
lessThanOrEqual - ID
greaterThanOrEqual - ID
Example
{
  "isNil": false,
  "eq": "4",
  "notEq": "4",
  "in": ["4"],
  "lessThan": 4,
  "greaterThan": 4,
  "lessThanOrEqual": 4,
  "greaterThanOrEqual": "4"
}

SupplierFilterInput

Fields
Input Field Description
and - [SupplierFilterInput!]
or - [SupplierFilterInput!]
not - [SupplierFilterInput!]
id - SupplierFilterId
Example
{
  "and": [SupplierFilterInput],
  "or": [SupplierFilterInput],
  "not": [SupplierFilterInput],
  "id": SupplierFilterId
}

SupplierSortField

Values
Enum Value Description

ID

Example
"ID"

SupplierSortInput

Fields
Input Field Description
order - SortOrder
field - SupplierSortField!
Example
{"order": "DESC", "field": "ID"}

UpdateCustomerInput

Fields
Input Field Description
type - String
firstName - String
lastName - String
email - String
phone - String
billingAddress - JsonString
shippingAddress - JsonString
Example
{
  "type": "xyz789",
  "firstName": "xyz789",
  "lastName": "xyz789",
  "email": "abc123",
  "phone": "xyz789",
  "billingAddress": JsonString,
  "shippingAddress": JsonString
}

UpdateCustomerResult

Description

The result of the :update_customer mutation

Fields
Field Name Description
result - Customer The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Customer,
  "errors": [MutationError]
}

UpdateMaterialInput

Fields
Input Field Description
name - String
sku - String
unit - String
price - Decimal
minimumStock - Decimal
maximumStock - Decimal
Example
{
  "name": "abc123",
  "sku": "xyz789",
  "unit": "abc123",
  "price": Decimal,
  "minimumStock": Decimal,
  "maximumStock": Decimal
}

UpdateMaterialResult

Description

The result of the :update_material mutation

Fields
Field Name Description
result - Material The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Material,
  "errors": [MutationError]
}

UpdateOrderInput

Fields
Input Field Description
deliveryDate - DateTime
invoiceNumber - String
invoiceStatus - String
invoicedAt - DateTime
paymentMethod - String
discountType - String
discountValue - Decimal
deliveryMethod - String
status - String
taxTotal - Decimal
shippingTotal - Decimal
discountTotal - Decimal
customerId - ID
items - [OrderUpdateItemsInput!]
Example
{
  "deliveryDate": "2007-12-03T10:15:30Z",
  "invoiceNumber": "abc123",
  "invoiceStatus": "xyz789",
  "invoicedAt": "2007-12-03T10:15:30Z",
  "paymentMethod": "abc123",
  "discountType": "xyz789",
  "discountValue": Decimal,
  "deliveryMethod": "xyz789",
  "status": "xyz789",
  "taxTotal": Decimal,
  "shippingTotal": Decimal,
  "discountTotal": Decimal,
  "customerId": "4",
  "items": [OrderUpdateItemsInput]
}

UpdateOrderItemInput

Fields
Input Field Description
quantity - Decimal
status - String
consumedAt - DateTime Timestamp indicating materials were consumed for this item
materialCost - Decimal Material cost allocated to this order item during batch completion
laborCost - Decimal Labor cost allocated to this order item during batch completion
overheadCost - Decimal Overhead cost allocated to this order item during batch completion
unitCost - Decimal Per-unit production cost captured at batch completion
Example
{
  "quantity": Decimal,
  "status": "abc123",
  "consumedAt": "2007-12-03T10:15:30Z",
  "materialCost": Decimal,
  "laborCost": Decimal,
  "overheadCost": Decimal,
  "unitCost": Decimal
}

UpdateOrderItemResult

Description

The result of the :update_order_item mutation

Fields
Field Name Description
result - OrderItem The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": OrderItem,
  "errors": [MutationError]
}

UpdateOrderResult

Description

The result of the :update_order mutation

Fields
Field Name Description
result - Order The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Order,
  "errors": [MutationError]
}

UpdateProductInput

Fields
Input Field Description
name - String
status - String
price - Decimal
sku - String
photos - [String!] Array of photo URLs for the product
featuredPhoto - String ID or reference to the featured photo from the photos array
sellingAvailability - String Customer-facing availability: available, preorder, or off
maxDailyQuantity - Int Optional per-product capacity per day (0 = unlimited)
Example
{
  "name": "abc123",
  "status": "abc123",
  "price": Decimal,
  "sku": "xyz789",
  "photos": ["abc123"],
  "featuredPhoto": "abc123",
  "sellingAvailability": "abc123",
  "maxDailyQuantity": 123
}

UpdateProductResult

Description

The result of the :update_product mutation

Fields
Field Name Description
result - Product The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Product,
  "errors": [MutationError]
}

UpdatePurchaseOrderInput

Fields
Input Field Description
status - String
orderedAt - DateTime
receivedAt - DateTime
supplierId - ID
Example
{
  "status": "abc123",
  "orderedAt": "2007-12-03T10:15:30Z",
  "receivedAt": "2007-12-03T10:15:30Z",
  "supplierId": 4
}

UpdatePurchaseOrderResult

Description

The result of the :update_purchase_order mutation

Fields
Field Name Description
result - PurchaseOrder The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": PurchaseOrder,
  "errors": [MutationError]
}

UpdateSupplierInput

Fields
Input Field Description
name - String
contactName - String
contactEmail - String
contactPhone - String
notes - String
Example
{
  "name": "xyz789",
  "contactName": "xyz789",
  "contactEmail": "xyz789",
  "contactPhone": "abc123",
  "notes": "xyz789"
}

UpdateSupplierResult

Description

The result of the :update_supplier mutation

Fields
Field Name Description
result - Supplier The successful result of the mutation
errors - [MutationError!]! Any errors generated, if the mutation failed
Example
{
  "result": Supplier,
  "errors": [MutationError]
}