-
I want to have a parameter that can represent a complex set of query conditions. Query conditions that are difficult or impossible to implement with automatically generated parameters. Most of these custom queries are used as filters. Like for example.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
You can use the same |
Beta Was this translation helpful? Give feedback.
-
Could you elaborate a bit more? |
Beta Was this translation helpful? Give feedback.
-
I would recommend creating your own resolver with a custom endpoint so you can extend the default query args, then when calling the service instead of doing the following: return TodoItemConnection.createFromPromise((q) => this.service.query(q), { ...query, ...{ filter } }); Do return TodoItemConnection.createFromPromise((q) => {
const qbBuilder = this.service.filterQueryBuilder.select(q)
// Do with qbBuilder what you want here
return qbBuilder.getMany()
}, { ...query, ...{ filter } }); |
Beta Was this translation helpful? Give feedback.
I would recommend creating your own resolver with a custom endpoint so you can extend the default query args, then when calling the service instead of doing the following:
Do