---
id: change/bcapps/9146
type: change
title: "#9146 [Shopify] Fix GraphQL rate limiter under-waiting after elapsed time"
summary: The Shopify connector's GraphQL rate limiter was waiting incorrectly when time had elapsed between requests, causing it to re-issue requests too early into the throttle window. The fix anchors the wake time to the current moment plus remaining wait time instead of incorrectly subtracting the elapsed gap twice.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit shpfy graphql rate limit
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:28.469Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: fceda6961213c0f291201a408a330fb281aa0be2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9146
    title: "microsoft/BCApps#9146: [Shopify] Fix GraphQL rate limiter under-waiting after elapsed time"
    date: "2026-07-07"
    commit: fceda6961213c0f291201a408a330fb281aa0be2
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/30153
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9146
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9146
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-07T14:34:14Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 27
  deletions: 2
  al: 1
apps:
  - Shopify
objects_touched:
  - key: codeunit/30153
    page: codeunit/30153
    type: codeunit
    id: 30153
    name: Shpfy GraphQL Rate Limit
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 641550
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9146 [Shopify] Fix GraphQL rate limiter under-waiting after elapsed time

> The Shopify connector's GraphQL rate limiter was waiting incorrectly when time had elapsed between requests, causing it to re-issue requests too early into the throttle window. The fix anchors the wake time to the current moment plus remaining wait time instead of incorrectly subtracting the elapsed gap twice.

[Pull request](https://github.com/microsoft/BCApps/pull/9146) · merged into `main` (BC30) on 2026-07-07 by onbuyuka · 2 files (+27 -2), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Rate limiter waited too short when time had passed since the last Shopify response, which caused avoidable GraphQL throttling on high-volume shops
- The wait time already accounts for elapsed time, but anchoring it at LastRequestedOn subtracted that elapsed gap a second time
- Wake time is now anchored at CurrentDateTime plus the remaining wait
- Removed the redundant earlier NextRequestAfter := CurrentDateTime assignment
- Added a test that checks the limiter waits for the remaining time after some time has elapsed
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 30153 "Shpfy GraphQL Rate Limit"](../../objects/codeunit/30153.md), Shopify: modified

## Context

- Work items: AB#641550
- Labels: AL: Apps (W1)
- Systems: integration

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
