V3.2.1 viewQuery "group" param not allowing a boolean value

When using the v3.2.1 SDK, I am trying to make a ViewQuery with the following params:
{ keys: […(array of keys)…], group: true }

This gives the following errors:
“reason”:“Invalid boolean parameter: \“1\””

[After a bit of investigation I realised this was because I was passing { group: true }. This needs to be { group: “true” }.

I was using 3.1.0 previously and I don’t think this was a problem (at least, I didn’t see the error when using the original code). However, I did previously find the same behaviour with a different parameter - “reduce”, which is a true/false flag that also needs to be passed as a string.

The doc here does state that reduce has to be a string (although I still think it should accept a boolean as well). But the same page says that “group” should be a boolean. So either the behaviour or the doc is wrong.If it’s the doc then the behaviour is not intuitive.



Has anyone been able to investigate this?


Hey @giles,

It looks like some changes to parameter serialization we made to support other features has affect view query execution in this case. I have filed the following issue, and there is a patchset available which will be included in the 3.2.3 release next month.

Cheers, Brett

1 Like