Make QueryGraph hold ShortestPathPatterns