When Should JSON-LD Use @graph for Multiple Entities?
Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team
The short answer: Use @graph when one page must describe several entities that belong together — classically a product page stating the Product, its brand or seller Organization, and related entities — and your architecture follows the one-canonical-block rule. @graph is an array of typed nodes inside a single ld+json block, cross-referenced by @id. AXO's parser descends into @graph when collecting @type values (including from nested graph nodes), so a graph block's entities all register in the structured-data findings. Keep @context at the root, a @type on every node, and @id values stable across pages. Verify in the free audit.
What is @graph in JSON-LD?
@graph is a JSON-LD keyword whose value is an array of node objects, each a typed entity, published together in one block. Nodes reference each other with @id, a unique identifier (often a URL with a fragment) that lets consumers treat statements across many pages as descriptions of the same entities — a store-wide graph assembled page by page.
The problem @graph solves
A product page's truth is plural: there is a product, an offer, a seller, maybe a brand, a breadcrumb trail. Separate blocks can state each, but they cannot easily state relationships between the statements — that this Offer's seller is that Organization — except by repeating values and hoping consumers merge them. @graph states the entities once, in one block, with explicit references: the product's brand is the node with this @id; the offer's seller is that @id.
For stores consolidating to one canonical block per page (the architecture in the canonical block guide), @graph is the mechanism that keeps the single block expressive. Without it, consolidation pressures you toward either an impoverished single-entity block or a relapse into multiple blocks.
How consumers — and AXO — read a graph
A JSON-LD processor expands a graph block into its constituent entity statements, each with its type and properties, linked by @id. AXO's parser mirrors this at the level it scores: when collecting @type values from valid blocks, it looks at top-level nodes and at nodes inside @graph arrays, so Product, Organization, and other graphed types all appear in the audit's reported type list.
That fidelity matters for scoring honesty: a graph-based page is neither advantaged nor penalised versus equivalent separate blocks. The choice is architectural (ownership, validity, maintainability), and the audit is neutral between architectures that produce valid, typed, anchored data. Choose the architecture your team will keep valid.
@id: the stability that compounds
An @id like https://yourstore.example/#organization, used identically on every page, tells consumers that the Organization described here is the same entity described everywhere — so its name, logo, and sameAs accumulate into one rich entity rather than thousands of duplicate stubs. Product @ids (the canonical product URL, optionally with a fragment) similarly unify a product's statements across listing, product, and feed contexts.
Unstable @ids — random per render, sessionised, or simply absent where references exist — forfeit the compounding. The discipline costs nothing at generation time (a template expression) and cannot be retrofitted into consumers' already-merged data. Stable @ids are the closest thing structured data has to a free lunch; take it.
When a graph is the wrong tool
Tiny pages with one entity gain nothing from a graph wrapper — a lone WebSite block is clearer flat. Graphs also suffer when generated by merging the outputs of several systems at runtime: the merge point becomes an unowned seam where validity goes to die, recreating the multi-injector problem inside one block. A graph should be produced by the canonical generator in one pass, from data, through an encoder — like every other block, only more so.
Deep nesting is the other smell. @graph is a flat array of nodes with references, not a tree to bury entities inside entities inside entities. If your generator produces five levels of nesting to express a product page, the model has gone wrong somewhere; flatten to nodes and references.
A sane product-page graph, described
Nodes: the Product (@id = product URL), its Offer can nest inside the Product as usual (offers does not need graph status), the Organization seller (@id = site URL + #organization) referenced by the offer's seller property, the Brand node if your catalogue's brands are first-class, and a BreadcrumbList node for the category path if your templates publish one. Four node kinds, one block, every reference resolvable.
Notice what is absent: the WebSite node belongs to the homepage's graph (or a site-wide block), not duplicated per product page beyond a reference. Graph thinking is catalogue thinking: each entity stated richly where it belongs, referenced economically everywhere else. That economy is what lets a consumer assemble a store-wide graph that is actually coherent.
Validating graph blocks
Graph blocks validate exactly as other blocks — parse, @context at root, @type on every node — plus graph-specific assertions: every @id referenced is defined in the graph or is a canonical external identifier (like the Organization's site-wide @id), and @ids are stable across renders of the same page (render twice, diff the ids). The validation routine absorbs these as extra semantic assertions for graph templates.
Then the audit closes the loop: the type list in the findings should show every graphed type. If a type you generate is missing from the list, the block is not being read as you think — usually a validity failure upstream in the same block, since graphs fail as units. One more reason the single generator must be encoder-clean.
The 5-action graph discipline
- Use @graph for multi-entity pages under the one-canonical-block rule — product pages first.
- @context at the root, @type on every node, no exceptions for nested entities.
- Stabilise @id values: the Organization's @id identical site-wide; product @ids from canonical URLs.
- Generate the graph in one pass from data through an encoder — never by merging systems' outputs at runtime.
- Validate references: every referenced @id resolves; render twice and confirm ids do not change.
Worked example: a winery's graph, from fragments to one statement
Example — fictional, for illustration. A winery's product pages carry three blocks from three systems, and the seller is stated three ways (winery name, parent company name, a trading name) with no indication they are one business. Agents reconciling the catalogue against the winery's feed — which uses the parent name — flag mismatches. The consolidation emits one graph per product page: Product node, Brand node for the estate, Organization node (@id stable, legal name plus trading name as alternateName) referenced as the offer's seller.
The audit's type list for the page now reads Product, Brand, Organization coherently; more importantly, the winery's catalogue assembles downstream into one graph with one seller entity, and the mismatch flags stop. The change was representational, not factual — the store always was one business. @graph is how a page says so in a way machines can use.
Related guides and the standing invitation
Companion reading for this topic: How Many JSON-LD Blocks Should a Page Have? · What Do @context and @type Mean in JSON-LD? · What Organization and WebSite Markup Belongs on Your Homepage? · How Do You Validate JSON-LD Before Agents Discard It?.
Whatever this guide led you to change, prove it the way every guide in this series ends: re-run the free audit on the same page and compare the dimension it names, read how the audit works if a finding is unclear, and see plans if you want the full guidance report and re-audit history while you work. A change you have not re-measured is a hope, not a fix.
Sources
- JSON-LD 1.1 — W3C Recommendation — the W3C Recommendation (2020) defining the JSON-LD syntax the markup in this guide uses.
- Schema.org — Product — the Schema.org vocabulary entry for Product — the type and properties this guide's markup names (current as of 2026).
Frequently asked questions
What is @graph for?
@graph publishes several typed entities in one JSON-LD block, cross-referenced by @id. It is the mechanism that lets a page follow the one-canonical-block rule while still describing a Product, its seller Organization, a Brand, and more, with their relationships stated.
Does AXO read types inside @graph?
Yes. Its JSON-LD parser collects @type values from top-level nodes and from nodes inside @graph arrays, so graphed entities register fully in the structured-data findings and type list.
What makes a good @id?
Stability and uniqueness: the same entity gets the same @id on every page and every render — conventionally a canonical URL, with a fragment for non-page entities like the Organization (site URL + #organization). Random or session-varying ids destroy consumers' ability to merge your statements.
When should I not use @graph?
On single-entity pages where a flat block is clearer, and wherever the graph would be assembled by merging several systems' outputs at runtime. Graphs should be generated in one pass by your canonical generator.
How do I validate a graph block?
Parse it, check @context at the root and @type on every node, assert every referenced @id resolves, and render the page twice to confirm @ids are stable. Then confirm the audit's type list shows all graphed types.