pubpub / platform

Open-source technology for creating full-stack knowledge applications for communities of all types.
https://knowledgefutures.org/pubpub
GNU General Public License v2.0
21 stars 2 forks source link

Add ability to update and delete pub field values, including relationships, to API #739

Open gabestein opened 3 weeks ago

gabestein commented 3 weeks ago

Motivation

Requirements

Acceptance Criteria

Extra work

3mcd commented 5 days ago

@allisonking Do you think one endpoint should handle all of this? Or one endpoint per operation, kind of like @tefkah has each relationship-related function broken out?

allisonking commented 4 days ago

Since we get an editor state from the the editor rather than a diff, I think ideally everything is one upsert, otherwise we'd have to track "this pubfield was removed" and then call the remove endpoint. but I also imagine doing everything in one upsert might be more difficult?

gabestein commented 4 days ago

An open question: should we do this RESTfully, or is this complicated enough that we want an RPC-style structure

allisonking commented 4 days ago

Although now that I'm looking at feat: add functions to interact with relationships more, there's a test specifically to not allow updating related pub relations via the current updatePub function. I think this means the editor can update its own local pub, and then maybe call updatePub on each of its related pubs?