This resolve function assumed that all paths were of the same type (ipfs, ipld, etc.). The CoreAPI does a much better job.