I often work with graphs with SWI-Prolog but not always weighted graphs. While I understand your question, it is so wide open it is hard to give more than a general answer.
These are the options I would try.
- Search the SWI-Prolog packs for graphs.
- Search the GitHub repositories of users with established code for SWI-Prolog. They are listed as a subsection in the Wiki topic Useful Prolog References.
- Look for such code in Prolog books.
- Search all of the GitHub repositories that have some Prolog code. (query)
HTH