use query type in type (#289)