In the 4.XX API a layer view can be queried for a graphics layer the same way you would query the layer view for a feature layer:
view.whenLayerView(lyr).then(function(lyrView){
lyrView.watch("updating", function(val){
if(!val){
lyrView.queryFeatures().then(function(results){
console.log(results);
});
}
});
});
You could pass a Query into layerView.queryFeatures with an extent geometry and the 'intersects' spatial relationship to query for features inside an extent. See Query | API Reference | ArcGIS API for JavaScript 4.3 for more details.
If you're using the 3.XX API, my bet would be that you could easily write a query method yourself by accessing each graphic in a graphics layer and using the geometry engine to test each one. This is not an approach that scales especially well. I'm not sure if layerView.queryFeatures scales very well either.