ad4m icon indicating copy to clipboard operation
ad4m copied to clipboard

Added resolver for perspective from url method

Open fayeed opened this issue 4 years ago • 4 comments

Depends on https://github.com/perspect3vism/ad4m/pull/29

fayeed avatar Jan 12 '22 05:01 fayeed

Basically ok, though I've solved this in Perspect3ve inside the UI only by iterating over all perspectives and searching for the one with the given sharedURL, which I would suggest to do here on this level as well as it would be less error prone, since no need to update any map cache...

lucksus avatar Jan 16 '22 12:01 lucksus

... which BTW is what is missing in this PR. The map/cache update happens in perspectiveSnapshot() and not in add() which can make the map get stale..

lucksus avatar Jan 16 '22 12:01 lucksus

Basically ok, though I've solved this in Perspect3ve inside the UI only by iterating over all perspectives and searching for the one with the given sharedURL, which I would suggest to do here on this level as well as it would be less error prone, since no need to update any map cache...

Right now we are doing exactly this getting all the perspectives using the all method and looping over it. The reason I thought this method might be needed is as the users join more neighbourhoods the number of perspectives will increase and looping every time would not be great.

fayeed avatar Jan 17 '22 03:01 fayeed

Well, I don't think looping over Perspectives will really become a problem.. Even less so if the looping would happen here in the ad4m-executor (because it would save GQL interface round-trips).

And I also don't oppose adding/merging this, but then I would like to see proper tests :)

lucksus avatar Jan 19 '22 11:01 lucksus