dennemark
dennemark
PPrisma
Created by dennemark on 7/29/2024 in #help-and-questions
Client Extension - when is query called?
Hi, I am developing a client extension and want to filter data after i have used my query. I.e. I could do the following:
$allModels: {
findUnique({args, query}){
return query({...args, foo: "bar"}).then((queryResults)=> queryResults.filter((x)=>x))
}
$allModels: {
findUnique({args, query}){
return query({...args, foo: "bar"}).then((queryResults)=> queryResults.filter((x)=>x))
}
Is this legit? I am wondering, because client extensions can be chained. So the next extension would get the args and query, but they would not fire, right?
5 replies