Thanks for the explanation. To me, it looks more like the issue with the client library’s API and the necessity to write complex raw queries than the need for this module to use the new protocol. Because currently if you want add the ask
part in your query, you’ll have to dump all the convenience of the client library with already defined methods for querying, filtering, choosing what to return etc., and write the same stuff by yourself to use the QnA module.
It would be great to write something like
const result = await myCollection.query.fetchObjects({
returnProperties: ['question', 'answer','round', 'points'],
filters: Filters.and(
myCollection.filter.byProperty('round').equal('Double Jeopardy!'),
myCollection.filter.byProperty('points').lessThan(600)
),
limit: 3,
ask: {
question: 'Who is the king of the Netherlands?',
properties: ['summary'],
})
and leave the burden of choosing the internal stuff (e.g. protocol) to the client itself.
But these are just my considerations, for sure.