ION Factory OS
  • Welcome to ION
  • Features
    • Procedures
      • Steps
        • Content
        • Datagrid
        • Fields
        • Attributes
      • Dependencies
      • Part-Procedure Relationship
      • Attributes
      • Standard Steps
      • Installation Requirements (Beta)
      • Nested Steps and Nested Standard Steps
      • Procedure Best Practices
    • Runs
      • Run Execution Overview
      • Runs And Step States
      • Batching Runs
        • Batching 2.0 Changes
      • Workcenter execution
      • Split Inventory on a Run
      • Redlines
      • Export run data
      • Scheduling runs
      • Time Tracking
      • Attributes
      • Outside Processing
      • Runs Best Practices
    • Parts Library
      • As-built Bill of Materials (aBOM)
        • Editing aBOM build requirements
        • aBOM Beta Changes
          • aBOM actions for developers
      • Inventory
        • Inventory status
        • Inventory splitting
        • Inventory merging
        • Inventory scrapping
        • Kitting
        • Inventory Movement Automations
      • Manufacturing bill of materials (mBOM)
        • mBOM versions
        • Made on Assembly (MOA)
        • Part Substitutes
        • Reference designators
      • Part Attributes
      • Part revision interchangeability
      • Supplier Part Numbers & Purchase Unit Conversions
    • Kitting and Inventory Fulfilment
      • Kit Statuses and Workflows
      • Inventory requests
      • Kitting and runs
      • Fulfilling Multiple Kits
      • Kanban Kitting
    • Purchasing
      • Purchase Orders
        • Types of Purchases
        • Purchase Order Approvals
        • Purchase Order FAQs
        • Supplier Part Numbers & Unit Conversions
        • PO Requirements, Terms, and Quality Clauses
      • Receiving/Inspection
      • Outside Processing
      • Consigned Parts
    • Barcode Labels
      • Templating
        • ION barcode minimum sizes
        • Sample templates
      • Printing
        • Configuring Zebra Browser Print
        • Server Based Barcode Printing (PrintNode)
      • Scanning
        • Scan barcodes from other systems
    • Quality
      • Issues
      • Further Actions - CAPA
      • Issues States, Dispositions, and Resolutions
      • Quality Best Practices
    • Tools
    • Locations
    • Attributes
    • Labels
      • Deleting labels
    • Notifications
    • Search
    • Settings
      • Role based access control
        • Full Glossary of ION Permissions
    • ION Actions
      • ION Actions examples for Quality
      • ION Actions examples for Runs and Procedures
      • ION ACTIONS examples for Supply Chain
  • Analytics
    • Inventory valuation
    • Part impact analysis
    • Users, Roles, Teams
    • Analytics FAQ
    • Data Connector
    • Data Products
  • Plans and Autoplan
    • Autoplan
    • Autoplan glossary
    • Preparing to use Autoplan
    • Clear to build reporting
    • Running Autoplan on a schedule
    • Firm and blocked plan items
    • Location constraints
    • Autoplan suggested suppliers and procedures
    • Reorder point
    • Plan input serial numbers
    • Applying a calendar
    • Plan Reservations
    • Independent schedules
    • Drive demand from kits
    • Drive demand below buy parts configuration
    • Group plan items with the same date
    • Manualy Changing Autoplan Status
  • API
    • How to create an App with ION
    • Access Tokens
    • About GraphQL
    • Interactive API explorer
    • API Keys
    • Examples
      • Notifications
      • Runs
      • Automatically updating fields in runs
      • Parts and Part Revisioning
      • mBOMs
      • Part Inventory and Kitting
      • aBOM (As-built Bill of Materials)
      • Edit time-tracking session data
    • Changelog
    • Webhooks
    • Pagination
  • Automations
    • Auto-checkout of Run Steps
    • Auto-Consumption of Lineside Inventory
    • Automatically Send Purchases to Suppliers
    • Set Close by Run Step on Issue Creation
    • Intent Management / Grade / Tier / Pedigree
      • Data Imprinting
      • ION Actions for Intent
    • Auto-Update mBOM Revision on Part Revision Update
    • Auto-approve part-procedure relationships
    • Purchase Order PDF and Versions
    • Auto Populate PO Line Attributes
    • Imprint Attributes from One Object to Another on a Desired Event
  • Integrations
    • Deploying Integrations and Automations
    • Arena
    • Cofactr
    • Datum
    • Duro
    • NetSuite
      • Purchasing in NetSuite, Receiving in ION
      • Work Order/Assembly Builds
    • Procurable
    • PDF Generator
    • Quickbooks
    • Ramp
    • Silkline Integration
    • Slack
    • Smartsheet
    • SOLIDWORKS
    • Teamcenter
  • Training
    • Standard Operating Procedures
      • Cycle Counting
      • Tool Utilization
    • Guided Flows
    • ION Sandbox
    • Chat Support for ION
  • Troubleshooting
    • Resetting your password
    • Resetting your Multi-Factor Authentication
    • You have no roles... error
  • Changelog
  • Adminstration
    • Security
      • Backups and Security FAQ
      • Single Sign-On (SSO)
        • Okta SAML connection setup
      • Export Control
      • Report Generator Disclaimer
    • Browser and Device Compatibility
    • Authentication
      • My company is new to ION, logging in for the first time.
      • I'm told I'm not authorized to access the application
      • My account has been deactivated
    • Login Page
  • Tickets Portal
Powered by GitBook
On this page

Was this helpful?

  1. API

Pagination

Make sure to include pagination parameters in queries to avoid network time out errors

PreviousWebhooksNextAutomations

Last updated 1 year ago

Was this helpful?

For any query that returns a list of results, we highly recommend using pagination. If pagination is not applied, it is much more likely that a network timeout error (in the form of a 502 error) will be returned. This occurs when an API call doesn't receive a response for 30 seconds. Pagination allows you to return a smaller data payload by returning a subset of the results to avoid the timeout error. It subsequently gives you a way to query further results as needed.

We use a cursor pagination pattern for our GraphQL API. See more info on GraphQL pagination .

Example

In this example, the parts query grabs the first five parts by utilizing the first parameter and fetch the endCursor in the pageInfo object as shown in the request as shown below.

{
  parts(first: 5) {
    edges {
      node {
        id
      }
    }
    pageInfo {
      endCursor         #use this to grab the next set of parts
      hasNextPage       #are their more parts after the ones returned in this query?
      totalCount        #total number of parts
      count             #number of parts returned by this query
    }
  }
}

Example Response

  "data": {
    "procedures": {
      "edges": [
        {
          "node": {
            "id": 20
          }
        },
        {
          "node": {
            "id": 22
          }
        },
        {
          "node": {
            "id": 24
          }
        },
        {
          "node": {
            "id": 26
          }
        },
        {
          "node": {
            "id": 28
          }
        }
      ],
      "pageInfo": {
        "endCursor": "YXJyYXljb25uZWN0aW9uOjE5",
        "hasNextPage": true,
        "totalCount": 1259,
        "count": 5
      }
    }
  }
}

In addition to first, ION queries have pagination parameters of last, before, and after.

In this next example, this parts query returns the next five 5 parts after the part identified by the endCursor from the previous query. If all parts in ION were to be queried, this pattern can be used to fetch all parts in batches of 5. In addition, use the hasNextPage to determine if there are more results remaining after this query.

{
  parts(first: 5, after: "YXJyYXljb25uZWN0aW9uOjE5") {
    edges {
      node {
        id
      }
    }
    pageInfo {
      endCursor         #use this to grab the next set of parts
      hasNextPage       #are their more parts after the ones returned in this query?
      totalCount        #total number of parts
      count             #number of parts returned by this query
    }
  }
}
here