Expand my Community achievements bar.

While writing in Graph QL these error showing $imageFormat: AssetTransformFormat=JPG Unknowntype , _assetTransform: Unknown argument and _dynamicUrl cannot query field on ImageRef

Avatar

Level 2

While writing in Graph QL these error showing $imageFormat: AssetTransformFormat=JPG Unknowntype , _assetTransform: Unknown argument and _dynamicUrl cannot query field on ImageRef

Syed_Shaik_0-1748940035754.png


 
Updating Media

Anybody suggest me in this thing

 

Regards

Syed Shaik

3 Replies

Avatar

Community Advisor

Hi @Syed_Shaik ,

Can you check below few points:-

  1. Unsupported Format: The format specified (JPG in this case) might not be supported or correctly configured in the AEM instance. Ensure that the format is supported and correctly set up in the asset transformation configurations.

  2. Version Compatibility: Ensure that the version of AEM you are using supports the asset transformation feature and the specific format you are trying to use.

    -Tarun

Avatar

Community Advisor

Hi @Syed_Shaik 

 

The error indicating that the type AssetTransformFormat is not recognized in your schema.

- Ensure you're querying valid types, fields, and arguments for image field

- There can be issue with version compatibility as well

- Remove unsupported fields or arguments that are raising errors(_dynamicUrl etc)

   image {
      ... on ImageRef {
           _path
           _dynamicUrl
        }
     }

 

Thanks

Avatar

Community Advisor

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.