cerc-io / laconicd-deprecated

Read-only mirror of https://git.vdb.to/cerc-io/laconicd-deprecated
https://git.vdb.to/cerc-io/laconicd-deprecated
GNU Lesser General Public License v3.0
6 stars 8 forks source link

Query results are not IPLD encoded #109

Closed dboreham closed 1 year ago

dboreham commented 1 year ago

In query results, references are encoded as regular attributes.

A key property of an IPLD service is that record properties that are (hash linked) references to other records should be explicitly denoted, allowing graph walking across linked records by software that does not understand their complete schema.

laconicd does not currently do this. For example in this GraphQL response, the reference is encoded as a regular string typed attribute:

        "attributes": [
          {
            "key": "build_artifact_cid",
            "value": {
              "string": "QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9",
              "json": null,
              "reference": null
            }
          },

Instead, responses should explicitly denote references, either in actual DAG-JSON format, or some scheme that can be transcoded to DAG-JSON, e.g.

        "attributes": [
            {"build_artifact_cid": {"/": "QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9"} }
telackey commented 1 year ago

https://git.vdb.to/cerc-io/laconicd/issues/109