BlueBrain / nexus

Blue Brain Nexus - A knowledge graph for data-driven science
https://bluebrainnexus.io/
Apache License 2.0
278 stars 74 forks source link

Expand the payload sent for studio table resources to make adding to DataPanel easier #3892

Open Dinika opened 1 year ago

Dinika commented 1 year ago

Problem: Right now we receive only the following information in the payload per row of the table:

{
    "s": {
        "type": "uri",
        "value": "https://dev.nise.bbp.epfl.ch/nexus/v1/projects/bbp-users/dinika"
    },
    "self": {
        "type": "uri",
        "value": "https://dev.nise.bbp.epfl.ch/nexus/v1/projects/bbp-users/dinika"
    }
}

This information is not enough to add a row to data-panel, so we do another (upto 2 requests) per row selected

  1. Get information such as, @id ,distribution, createdAt, name etc. A sample of what we receive is as follows
  2. If the @id returned by the response to the request above is of "curie" format, we make another request to get expanded id. (To be seen, if we can only do this request instead of the first one).

Proposal Get the following extra information in the original request that returns all rows for studio table row:

Dinika commented 11 months ago

Please note that if the above proposal is not do-able, we can use the multi fetch feature, to fetch all the selected rows at once, instead of requesting them one by one. We are doing something similar in DataExplorer (see function fetchMultipleResources in src/subapps/dataExplorer/DataExplorerUtils.tsx).