I am wondering if there's a queryTask for an entire Feature Service (not just layers within a Feature Service)? I am trying to duplicate the functionality located at this site: ArcGIS REST API The main component is that I need to setup the layerDefs parameters. I cannot see anything located in the ArcGIS JavaScript API for this, with the exception of executing an esriRequest. Am I missing something?