I'm trying to connect mongo db with replica set with mongo db query tool but getting "Query couldn't resolve." While same working for normal mongo db without replica set.
Is the query that you are using the same when you are comparing mongo DB with and without a replica set? Are you sure that the query that you are using in the replica set case is correct?
After a little more research, I have a different question: are you performing the query against the master in a replica set, or against a secondary? The Mongo DB Query Tool will support queries against master but not against secondary. Querying against secondary requires additional steps, and the Mongo DB Query Tool currently does not perform them - see https://studio3t.com/whats-new/how-to-query-mongodb-secondary-replica-set-members/