1How to loop through id in a function and get the results in vue.js and Graph ql query?
i want to return value based on the fsID(id) from graph ql query in Vuejs,...my return value should contain all the values from the query
const getLogData = async () => {
Array.prototype.forEach.call(AppObj.Appid, child => {
var fsId = AppObj.Appid // getting data from somewhere on the code ad assigning it to var fs id to execute graph QL query
debugger
console.log(fsId)
const query2 = `
query( $fsId: ID!){
agEvents(fsId : $fsId )
{
edges
{
node
{
id
eventType
user
{
id
email
}
}
}
}
}
}
`
debugger
const variables = { fsId }
lx.executeGraphQL(query2, variables).then(function (result2) {
var logObj = {}
logObj.id = fsId
logObj.logdata = result2
})
})
}
console.log(getLogData)// need all my results as a return here
i want to return value based on the fsID(id) from graph ql query in Vuejs,...my return value should contain all the values from the query
i have tried like this enter image description here ,but then Lx is not able to reach