Query results are not IPLD encoded #109

Closed
opened 2023-08-25 12:51:55 +00:00 by dboreham · 1 comment
Owner

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"} }

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](https://ipld.io/specs/codecs/dag-json/spec/) format, or some scheme that can be transcoded to DAG-JSON, e.g. ``` "attributes": [ {"build_artifact_cid": {"/": "QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9"} } ```
roysc self-assigned this 2023-10-11 20:08:18 +00:00

This issue is stale because it has been open 45 days with no activity. Remove Status: Stale label or comment or this will be closed in 7 days.

This issue is stale because it has been open 45 days with no activity. Remove `Status: Stale` label or comment or this will be closed in 7 days.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd-deprecated#109
No description provided.