Closed yousiftouma closed 1 year ago
Corresponding feature is explicitly available in the java client: https://github.com/adobe/aem-headless-client-java/blob/main/README.md#running-queries
Any input? @easingthemes @bdelacretaz (sorry for pings, but don't know if this repo is watched)
PR opened,
@param {string} query - the query string
Changed to
@param {string|object} body - the query string or an object with query (and optionally variables) as a property
in
runQuery (body, ...)
This way it's backward compatible.
Usage
# new
runQuery({
query: queryString
variables: {
var1: val1,
...
}
})
# or old
runQuery(queryString);
Cool, thanks! Hope to see it merged soon @easingthemes
Expected Behaviour
I can send
variables
property in a GQL query that has parametersActual Behaviour
I can not use variables in GQL queries
Reproduce Scenario (including but not limited to)
Try to use
runQuery
with variablesSteps to Reproduce
Try to use
runQuery
with variablesPlatform and Version
Sample Code that illustrates the problem
Pseudo code in the context of AdobeIO
Logs taken while reproducing problem
I'm not sure if it is possible, if it is how would one use variables in a query?