adobe / aem-headless-client-js

AEM Headless Client for JavaScript
Apache License 2.0
25 stars 12 forks source link

Query arguments Object is failing for nested arrays #55

Closed easingthemes closed 1 year ago

easingthemes commented 1 year ago

When Query arguments are passed as an Object, objToStringArgs function is transforming it into Query params https://github.com/adobe/aem-headless-client-js/blob/main/src/utils/GraphQLQueryBuilder.js#L10 This functions is not covering nested arrays, only first level array and nested objects.

Expected Behaviour

Query arguments Object can have any structure

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

{ _expressions: [ {obj} ] }

Array provided here is not converted correctly.

Logs taken while reproducing problem