Expand my Community achievements bar.

SOLVED

Adobe Mesh API is not able to parse the AEM CF GraphQL queries

Avatar

Level 3

Hi All,

    We have an issue that we are not able to get the proper response from Adobe Mesh API  as it is throwing syntax error while passing the graphql query as part of the payload to it as in the below screenshot:

MandaPavanKumar_0-1685342503744.png

Here is the GRAPHQL  Query for the AEM Content Fragements :

{
  commerceCfmList(
    filter{productsku{_expressions[{value"00000105", _operatorEQUALS}]}}
  ) {
    items {
      productTitle
      productsku
      productCategory
      productDescription {
        plaintext
      }
      imagePath {
        ... on ImageRef {
          _path
        }
      }
    }
  }
}
And here is the Graphql Variable :
 {
  "name": "00000105"
}




Here is the actual Graphql Query:
{
  products(
    filter{category_id{eq"46"}},
    sort{nameASC},
    pageSize5,
    currentPage1
  ) {
    total_count
    items {
      id
      name
      sku
       image {
        url
        label
        position
        disabled
      }
      price_range {
        minimum_price {
          regular_price {
            value
            currency
          }
          final_price {
            value
            currency
          }
          discount {
            amount_off
            percent_off
          }
        }
        maximum_price {
          regular_price {
            value
            currency
          }
          final_price {
            value
            currency
          }
          discount {
            amount_off
            percent_off
          }
        }
      }
    }
  }
  commerceCfmList(
    filter{productsku{_expressions[{value"00000105", _operatorEQUALS}]}}
  ) {
    items {
      productTitle
      productsku
      productCategory
      productDescription {
        plaintext
      }
      imagePath {
        ... on ImageRef {
          _path
        }
      }
    }
  }
}
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

 

It seems that there might be a syntax error or incorrect structure in the payload being sent to the Adobe Mesh API

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Hi,

 

It seems that there might be a syntax error or incorrect structure in the payload being sent to the Adobe Mesh API