code: public boolean isQueryArchived(Query query) {
      if (query.getArchived()) {
        return true;
      }
      
      return resourceController.isFolderArchived(query.getParentFolder());
    }
docs: Returns whether query is archived
  
  @param query query
  @return whether query is archived