Skip to main content

How should my integration paginate queries, handle errors, and retry updates?

Inspect both data and errors in every GraphQL response, and record a successful result only after checking the operation’s documented response.

Use the API reference to select fields, required arguments, filters, and pagination. Start with a small page, follow that query’s pagination until it reports no next page, and avoid deeply nested collections. Different queries can use different filters and pagination arguments.

Send variables separately from the query:

{
"query": "query InspectType($name: String!) { __type(name: $name) { name kind } }",
"variables": {"name": "Query"}
}

For ongoing syncs, keep a checkpoint and the external and Endless identifiers together. Process changed records and periodically compare the systems for missed updates. If a multi-step update fails, resume the failed step. After a timeout, look up the record before retrying creation: the first request may already have succeeded. Check the current status before repeating a status change or shipment report.

If a request returns less data than expected, check company context and filters. If an operation fails, compare its fields, enum values, and required references with the API reference. Treat nullable fields as optional. Reduce fields and page size for slow requests.

For support, include the integration name, company handle, operation name, request time and timezone, relevant record identifiers, and a sanitized query, variables, and error response. Keep credentials and unnecessary customer details out of logs and support requests. Your technical team owns the connector’s mappings and reconciliation; Endless support can help with access and API behavior.