Skip to content

Answer the stock per source of a product - #2

Merged
paales merged 2 commits into
mainfrom
claude/stock-sources
Oct 13, 2026
Merged

paales merged 2 commits into
mainfrom
claude/stock-sources

Conversation

@paales

@paales paales commented Oct 13, 2026

Copy link
Copy Markdown
Member

New module GraphQlCatalogInventory adds ProductInterface.stock_sources: [ProductStockSource!]!.

  • What it lists: the source items of the product in the enabled sources of the website's stock, in source priority order.
  • Each entry: source_code, name, quantity, in_stock (the source item status), is_pickup_location (MSI in-store pickup, when that module is installed), latitude, longitude, postcode, city and country_code.
  • Quantity: it is the physical quantity. Reservations count on the stock only, so it is not the salable quantity. The field description says so.
  • Products without source items: a configurable product, for example, answers an empty list.
  • Resolver: Model/Resolver/StockSources is a batch resolver. One source item search covers every product of the request.

Validated:

  • Unit tests: pass, including StockSourcesTest: priority order, a disabled source left out, and a product without items.
  • Parity: with the matching CatalogStorefront branch, the gate is 29 of 29 identical, 8 skipped. The new query 37-stock-sources covers simples, a configurable product and a child.
  • Core path cost: one source item search for the page.

This branch also contains the followFilters commit, which is already on main through #1, so the diff shows the inventory module only.

🤖 Generated with Claude Code

https://claude.ai/code/session_019nYtEbdpZ5P5wLAoCfD4MX


Generated by Claude Code

…tock, with the pickup flag and the location of each source, so a storefront shows store availability without a query per source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019nYtEbdpZ5P5wLAoCfD4MX
…no generated code exists, as the CI installation has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019nYtEbdpZ5P5wLAoCfD4MX
@paales
paales merged commit f9eace7 into main Oct 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants