adobe / commerce-cif-connector

AEM Commerce connector for Magento and GraphQL
Apache License 2.0
43 stars 27 forks source link

Category picker graph query #165

Closed rossellacuccurullo closed 3 years ago

rossellacuccurullo commented 3 years ago

Expected Behaviour In the category picker the categoryWithChildren graphql query need is as string as param

Actual Behaviour In the category picker the categoryWithChildren graphql query the category id is passed as int causer a coercion issue.

Steps to Reproduce Access in edit mode on the category page and we click on ”View with category”. Load the first level category :the fallowing graphql query is performed:

1.  {operationName: "categoryWithChildren", variables: {id: "2"},…}
1.  operationName: "categoryWithChildren"
2.  query: "query categoryWithChildren($id:String!){categoryList(filters:{ids:{eq:$id}}){id children{image id name url_key url_path updated_at __typename children_count product_count}__typename}}"
3.  variables: {id: "2"}
1.  id: "2"

Load the subcatetegory and the fallowing graphql query is performed:

1.  {operationName: "categoryWithChildren", variables: {id: 21},…}
1.  operationName: "categoryWithChildren"
2.  query: "query categoryWithChildren($id:String!){categoryList(filters:{ids:{eq:$id}}){id children{image id name url_key url_path updated_at __typename children_count product_count}__typename}}"
3.  variables: {id: 21}
1.  id: 21

The operation name is the same of the first query but in this case the parameter is passed as “int” even if is defined as string in the query categoryWithChildren($id:String!) This second query cause an exception in the CIF Connector due to the coercion since an int was expected (Magento seem accept this behavior). The problem is that this query is build through an external lib.

screen

Platform and Version

cif core component 1.6.0

mhaack commented 3 years ago

Thanks @rossellacuccurullo for reporting this. To be sure the issues you see are with AEM Commerce as a Cloud Service. Is this correct?

Asking because the screenshots indicate this. This GitHub project is a different project! This is the CIF Connector for classic AEM 6.4/6.5 deployments, not AEM as a Cloud Service.

However we will have a look (@herzog31 ). @rossellacuccurullo if my assumption about AEM Commerce as a Cloud Service is correct the please open an Adobe Support case.

rossellacuccurullo commented 3 years ago

Yes is AEM as a Cloud Service. We escalate the issue to our Adobe support that suggest us to open an issue here.

mhaack commented 3 years ago

Thanks @rossellacuccurullo