facebook / facebook/relay

Docs: Object Identification Spec Examples use non-global id values

Open
#3,012 1 comment 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

The [Object Identification Spec docs](https://github.com/facebook/relay/blob/master/website/spec/ObjectIdentification.md#node-interface) describe `id` needing to be refetchable without additional type information and thus typical systems would need to encode some kind of type information into the `id` value itself. However, in the examples throughout the documentation, the `id` values used are simple small integers or stringified small integers. This has been causing us a lot of confusion as we are discussing our implementation. My proposed fix would be use realistic `id` values that encode the type information something like pseudo-code: `base64("user:" + "4")`. That way the doc examples would accurately reflect a compliant implementation and thus reduce confusion.

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.