The problem you are describing is the problem of the postman, without knowing which is the starting point. From your question I believe that your graph is not directed, so the distance from A to B is congruent to the distance from B to A. In this case, you can solve your problem by iterating all combinations of your points and calculating the total distance (that is, the sum of the distances in the path). The minimum value is the solution of the problem.
Here you can read more about generating the combinations. But do not generate them in advance, that's not good for memory management, just always calculate the next combination, measure its total distance and compare it to the minimum. If its lower than the minimum, modify the minimum distance to the new minimum and store the combination into an array which will contain the optimal path at the end. This is the end of the answer if your graph is undirected and all node-pairs have a vertice.
If I am wrong and your graph is directed, then it's not enough to generate all the combinations, you will need to generate all variations instead.
Note, that if for some reason it might be a case when a node-pair not necesarily has a vertice. In this case you need to generate all the valid variations, where valid means that two nodes near each-other has a vertice.