dyne / zenpub

Reflow federated economic network
GNU Affero General Public License v3.0
13 stars 3 forks source link

Unable to delete a Resource - API returns null #56

Closed viktorsmari closed 3 years ago

viktorsmari commented 3 years ago

Example query:

mutation {
  deleteEconomicResource(
    id:"01F7P868ZHY72RV0VNFKJT2K6B"
  )
}

//response

{
  "data": {
    "deleteEconomicResource": null
  }
}

And Resource is not deleted.

jaromil commented 3 years ago

we cannot delete objects which have certain immutable fields as well are part of chains of authentication. think of a flag of sorts that marks the state of object as discarded or so....

oksanasalohubova commented 3 years ago

This ticket was checked against the BonFire API. Resolution: Similar to ZenPub, there is no way to delete resource also. After deleting list of resources is not changed. The EconomicResource has not field archived also. Details See the screenshot with available queries in BonFire:

Снимок экрана 2021-10-21 в 12 08 42
adam-burns commented 3 years ago

Please read https://github.com/dyne/zenpub/issues/56#issuecomment-862158814 This applies to all back ends.

pral2a commented 3 years ago

I don't agree the issue is closed by pointing to an inner comment that doesn't provide any tangible solution or a roadmap for it.

  1. It should specify if deleteEconomicResource will be removed or not from the ZenPub and Bonfire schema

https://github.com/bonfire-networks/bonfire_valueflows/blob/6e111ecb4fa3fae67ea9566e5c20f1b7fb388fe6/lib/schema.gql#L4025

  1. It should specify the new mutation to archive (not to delete) an economic resource i.e. archiveEconomicResource