Hi @syed_shaik ,
You're seeing errors like:
- Unknown type AssetTransformFormat
- Unknown argument _assetTransform
- Cannot query field _dynamicUrl on ImageRef
This typically means:
- You're using features that aren't supported by your current AEM version
- The GraphQL schema for assets is not properly generated or supported
1. Check AEM Version
Ensure you're using AEM as a Cloud Service (AEMaaCS) or AEM 6.5.15+. Asset GraphQL transformations (_assetTransform, _dynamicUrl, etc.) are only supported in:
AEMaaCS (Adobe-hosted)
Or local SDKs with asset GraphQL enabled
If you're using older AEM versions (e.g., 6.5 < SP15), these fields will not be available.
2. Enable Asset GraphQL Schema
To use _dynamicUrl, _assetTransform, or AssetTransformFormat, you must:
Enable Asset GraphQL APIs in AEMaaCS via Asset Compute Service.
Assets must be tagged with GraphQL fragments and indexed correctly.
Check:
query {
__type(name: "AssetTransformFormat") {
name
enumValues {
name
}
}
}
This returns available formats (JPG, PNG, etc.) if the schema is correct.
3. Correct Query Example
Here's a working GraphQL query for retrieving a content fragment with image and transformed asset:
query GetContentFragment($path: String!) {
contentFragment(path: $path) {
... on MyFragmentModel {
title
image {
... on ImageRef {
_path
mimeType
_dynamicUrl
_assetTransform(transform: { format: JPG, width: 400 }) {
url
width
height
}
}
}
}
}
}
Variables:
{
"path": "/content/dam/your-fragment"
}
4. Fix Schema Errors
If you're seeing:
- Unknown type: AssetTransformFormat
- Unknown argument: _assetTransform
Then:
- Go to AEM Author > Tools > Assets > GraphQL schemas
Make sure your content fragment model has:
- A field of type Content Reference (Image Only)
Re-index GraphQL schema:
- Admin => GraphQL => Schema Editor => Sync or Publish Models
5. Fallback for Incompatible Versions
If you’re not on AEMaaCS, and need basic image data, use only:
image {
... on ImageRef {
_path
mimeType
}
}
Do not use:
_dynamicUrl
_assetTransform
AssetTransformFormat
These only work on AEMaaCS with Asset Compute Service enabled.