Users may want to validate multiple queries at 1 time.  optQueryId would should be an array if we want to support this (and corresponding changes will be needed in other places