I'm new to structured data along with schema.org and json-ld, and have been checking out examples and documentation the past few days.
I came across the @graph
array and it confuses me a lot.
According to my research it looks like only Yoast uses the @graph
array. Is it safe to use it? Are there any potential after-effects?
Does Google allow it?
Is it better to use @graph
over a "standard" structure and why?
I could find almost nothing about it.
Google supports @graph, and I think Bing supports it now.
Think of it as a way to provide a list/array of entities at the top level of a single script tag. Without @graph you need to start with one entity and link to the others from it. Or put them all in separate script tags.
Yoast and I like to follow a flat entity structure using @graph. Basically having all the entities directly in the @graph then have them link to each other using their @id values. This is a good structure if you want to have more than one link to a specific entity. It also makes it easier to add or modify entities.