Add query dependencies