Developer Resources > Examples

Gotcha’s

 

In this section, we share tips on how to troubleshoot common errors about:

Making Query Connections:

When querying for connection fields, if no first or last parameter is specified, a default of first: 100 is assumed.

Cannot request more than 100 items per connection field.

For example, a query like the following:

query {
  purchase_orders {
    request_id
    complexity
    data {
      edges {
        node {
          id
          line_items {
            edges {
              node {
                sku
              }
            }
          }
        }
      }
    }
  }
}

Has a connection for line_items inside purchase_ordes, so this means that if we don’t specify line_items(first:10) and purchase_orders(first:10) the complexity would be of 10001 (100 purchase_orders * 100 line_items each + 1 ), even if the PO does not have 100 line items or 100 purchase orders.

Client IDE not connecting:

A common error you might be having when trying to view de Docs & Schema using any of our recomended Client IDEs is not being able to access the docs.

For this purpose, we have a couple of suggestions:

  1. Using the Desktop Versions or Extensions of this Client IDEs. Usually, Web versions of these clients tend to have this kind of issue.
  2. Disabling cache on the Client IDE*

*you can do this by opening dev tools from inside the Client IDE and selecting Disable cache

Dates:

All dates are stored as UTC

ISODateTime: A DateTime field type that understand ISO 8601 strings, besides datetime objects. It supports strings with and without times, as well as using T or space as delimiter

Ex.

  • YYYY-mm-dd
  • YYYY-mm-dd HH:MM:SS
  • YYYY-mm-ddTHH:MM:SS

Dimensions:

Input dimensions are considered to be in the account’s settings unit, unless specified by the field name like weight_in_lbs
Output dimensions will always be in the account’s settings unit, unless specified by the field name like weight_in_lbs

Available Inventory:

The available field inside warehouse_products has a default cost of 30.

The reason for this is that it has complex calculations to figure out the available quantities (For example, it checks if the product is virtual, if it’s a Kit or inside a Kit and figuring out the component with lower inventory, the sell ahead quantity of that product on Purchase Orders amongst other variables)