Guys,
I have the following FQL.
Map(
Paginate(Distinct(Match(Index("clordersku_by_clorder"), "PzdJhnWOYD"))),
purveyorId =>
Paginate(Match(Index("clordersku_by_purveyor"), "PzdJhnWOYD", purveyorId))
)
It returns data like this
{
data: [
{
data: [
["18470", "fife-0114", "Off to Bed with a Good Book Card", "1"],
["18470", "fife-0114", "Off to Bed with a Good Book Card", "jjj"]
]
},
{
data: [
["18476", "BRWI-0101", "Sourdough Loaf ", "1"],
["18476", "BRWI-0101", "Sourdough Loaf ", "jjj"],
["18476", "BRWI-0106", "White Bloomer (Sliced) ", "1"],
["18476", "BRWI-0106", "White Bloomer (Sliced) ", "jjj"],
["18476", "BRWI-0108", "Tomato Bloomer Loaf", "1"],
["18476", "BRWI-0108", "Tomato Bloomer Loaf", "jjj"]
]
}
]
}
So this bit I managed to do on my own. But i need this working for the graphql endpoint because ive a 3rd party integration. So i thought of creating a function like
Query(
Lambda(
["orderId"],
Map(
Paginate(Distinct(Match(Index("clordersku_by_clorder"), "PzdJhnWOYD"))),
Lambda(
"purveyorId",
Paginate(
Match(Index("clordersku_by_purveyor"), [
"PzdJhnWOYD",
Var("purveyorId")
])
)
)
)
)
)
using the same FQL i did before. but how do i now call this UDF via graphql and retrieve the data?