3 ms·
I think more important than worrying about people treating an opaque value as structured data, is wondering _why_ they're doing so. In the case of this blog pos
by bigblind 9mo ago
I think more important than worrying about people treating an opaque value as structured data, is wondering _why_ they're doing so. In the case of this blog post, all they wanted to do was construct a URL, which required the integer database ID. Just make sure you expose what people need, so they don't need to go digging.
Other than that, I agree with what others are saying. If people rely on some undocumented aspect of your IDs, it's on them if that breaks.
- plorkyeran 9mo agoExposing what people need doesn’t guarantee that they won’t go digging. It is surprisingly common to discover that someone has come up with a hack that depends on implementation details to do something which you exposed directly and they just didn’t know about it.
- Macha 9mo agoGitHub actually do have both the database ID and URL available in the API: https://docs.github.com/en/graphql/reference/objects#pullrequest https://docs.github.com/en/graphql/reference/objects#pullreq... OP’s requirements changed and they hadn’t stored them during their crawl