added GraphQuery optimization to Gremlin.