In the latest version of the ArcGIS API for JavaScript (4.12), the QueryTask function doesn't seem to be working as expected anymore.
I am getting the following error:
I discovered that if I create a new instance of a Query, it works, but when trying to autocast using a simple object for the query, it doesn't work.
Here is a simple example that demonstrates the problem that I am seeing:
Notes: that when you switch the script reference back to 4.11 from 4.12, the QueryTask works as expected.
I would prefer to use autocasting for my queries going forward. Please let me know if I am doing something wrong.
Can you clone the JSBin and show it working when you create a new query instance, then I'll log a bug.
Here is a JSBin using a new query instance. Works fine.
https://jsbin.com/nebeceziyo/1/edit?js,output
Thanks for logging this for me.
Hi Jack,
I have logged a bug for this issue: BUG-000123651
Thanks for the find.
Do you have an approximate timeline for this bug fix?
You can follow the status of the bug here: https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyMzY1MQ==
A workaround would be to not use outFields:["*"] and instead explicitly set the outFields to only the needed fields, for example: outFields: ["MTN_PEAK","RANK"]
This has been resolved in the 4.13 version of the api. Thank you.