Something I feel atproto developers could benefit from is being able to retrieve the record key (rkey) from a record without having to do string manipulation with the at-uri. For example, to get the record key from this record, I have to split the string in an array using the “/“ as a separator, and then pop the last element.
const at-uri = "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3myuokanzfk2j"
// output: 3myuokanzfk2j
console.log(at-uri.split("/").pop())
I feel adding an rkey field would be a small but appreciated improvement to the developer experience. Open to hearing opinions about this.
Even made a github issue about this in the app.bsky.* lexicons. This can be applied to other ones, but these lexicons were where I discovered this.