if a query is passed to filter, resolve filter on query success

An attempt to provide a solution for people concerned with #735 and #1013