Cursor Based Pagination Not working on Locations in GraphQL Admin API

Topic summary

  • Reported issue: Cursor-based pagination on the Shopify Admin GraphQL locations query does not advance to next pages when using the returned endCursor with the after argument.

  • Query context: locations(first: $first, after: $after, includeLegacy: true) requesting pageInfo (hasNextPage, endCursor) and nodes (id, name, createdAt, address fields). API docs referenced align with version 2024-07.

  • Technical note: Cursor-based pagination should use endCursor from pageInfo as the after value to fetch subsequent results; the user indicates this flow isn’t working for Locations.

  • Evidence: A linked Jam video demonstrates the behavior.

  • Outcome/status: No confirmed cause, workaround, or resolution provided yet. The thread remains open with the core question unresolved.

Summarized with AI on December 18. AI used: gpt-5.

In Lcations model cursor based pagination not working in graphQL Admin API.

My graphQL query

query GetLocations($first: Int!, $after: String) {
  locations(first: $first, after: $after, includeLegacy: true) {
    pageInfo {
      hasNextPage
      endCursor
    }
    nodes {
      id
      name
      createdAt
      address {
        address1
        address2
        city
        countryCode
        provinceCode
        zip
        phone
      }
    }
  }
}

Here is the Jam video
https://jam.dev/c/75f6446a-9bfe-4fc5-ae76-8b08d8db760b