Expand my Community achievements bar.

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

AEM 6.5 Cloud Version and CIF Addon Installed go in exception when NULL is found in the response

Avatar

Level 1

Hi,

 

I am experiencing a problem using CIF, I am using CategoryRetriever from ProductList to query the list of attributes I need to display on a page.

 

When in the getCategory query I receive even a single attribute to null in response, the MagentoGraphqlClient class throws an exception when executing the call.

 

this is the exception:

com.shopify.graphql.support.SchemaViolationError: Invalid value null for field CategoryTree.application_for

GianfrancoSe_0-1744216733916.png

 

Is there any way to handle calls with nullable attributes?

maybe some CIF configuration.

 

thanks in advance.

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi,

There's a patch(fix-error-returning-null-attribute-values.patch) available for download, once downloaded, apply the patch through command line as below 

patch -p1 < fix-error-returning-null-attribute-values.patch

 In your GraphQL, change the "application_for" field to nullable

Then handle null checks in frontend

if (category.application_for !== null) {
  // Proceed with using category.application_for
}

With above you can handle for null case.

 

Thanks,

 

Kind regards,

Kiran Buthpur

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hi,

There's a patch(fix-error-returning-null-attribute-values.patch) available for download, once downloaded, apply the patch through command line as below 

patch -p1 < fix-error-returning-null-attribute-values.patch

 In your GraphQL, change the "application_for" field to nullable

Then handle null checks in frontend

if (category.application_for !== null) {
  // Proceed with using category.application_for
}

With above you can handle for null case.

 

Thanks,

 

Kind regards,

Kiran Buthpur