updated gqlquery to use an ancestor