ipfs / ipfs/kubo

Docs are inaccurate for `dag get`

Open
#5,363 8 comments 0 reactions 0 assignees View on GitHub
status/deferred topic/docs-ipfs
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

Our docs for the `dag get` command are not entirely accurate and invite some misconceptions: https://github.com/ipfs/go-ipfs/blob/3296412d19d5a7b565ece21f5d7c275c41bcf246/core/commands/dag/dag.go#L186-L192

In particular, it doesn’t really “get a DAG node” so much as it gets the value at an IPLD path. For example:

```sh
> curl 'http://localhost:5001/api/v0/dag/get?arg=zdpuAnhvECCigEM92DCZVwFguAHTSg1yJcPLyPdsJsVTYRuXB/title'
# "A simple example of an IPLD node"
```

I guess you could sort of say that’s technically a node — *kind of* — but I think most people would interpret the node in the above example to be the data at:

```
/ipfs/zdpuAnhvECCigEM92DCZVwFguAHTSg1yJcPLyPdsJsVTYRuXB
```

…not the string at:

```
/ipfs/zdpuAnhvECCigEM92DCZVwFguAHTSg1yJcPLyPdsJsVTYRuXB/title
```

What’s a better way to explain this?

See also this discussion: https://github.com/ipld/ipld/issues/44#issuecomment-411873611. /cc @mikeal @diasdavid @whyrusleeping

Once we figure out the right language, this also needs updating in [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget), in js-ipfs’s help text, and in the docs.ipfs.io site (which is generated from the code here).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.