Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

In AEM We are not getting value "@type" from Content Fragment to Graphiql

Avatar

Level 1

In AEM We are not getting value "@type" from Content Fragment to Graphiql

We have a Jsontype Field in content Fragement where I am passing SEO Script 

but apart from "@type" I am getting all values from CF to Graphiql

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@TyPe is a JSON-LD reserved key, and many Java/GraphQL pipelines (including AEM’s GraphQL JSON scalar/Jackson stack) treat keys starting with @ as unsafe (they’re used in polymorphic deserialization exploits). So AEM’s GraphQL layer drops or ignores @TyPe while passing the rest (name, url, image, etc.). That’s why you see everything except @TyPe in GraphiQL.

Shiv Prakash

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

@TyPe is a JSON-LD reserved key, and many Java/GraphQL pipelines (including AEM’s GraphQL JSON scalar/Jackson stack) treat keys starting with @ as unsafe (they’re used in polymorphic deserialization exploits). So AEM’s GraphQL layer drops or ignores @TyPe while passing the rest (name, url, image, etc.). That’s why you see everything except @TyPe in GraphiQL.

Shiv Prakash

Avatar

Community Advisor

Hi @RiyaSh10 ,

Rename the field in your Content Fragment model to something like type (without @). Then, in your frontend, map it back to @type when rendering the JSON-LD for SEO.
seoData["@type"] = seoData["type"];
This avoids GraphQL limitations while still delivering valid structured data.

 

 

Thanks!

Hrishikesh Kagane

Avatar

Level 2

When you're not getting the @TyPe property from an AEM Content Fragment (CF) in GraphiQL, but you're getting other properties, the issue is most likely due to the fact that @ is a reserved character in GraphQL and/or JSON serialization contexts. AEM and GraphQL might be stripping or ignoring the property name starting with @.