createRecord should return a view of the record #1169
Replies: 5 comments 2 replies
-
Hmm I'm not necessarily opposed but what's the usecase? You supply the record itself as an input so it seems that that's already available to the client |
Beta Was this translation helpful? Give feedback.
-
Yes, you have the raw data of the record, but having the resulting data structure that's actually stored in the repo with all of its metadata would be useful for rendering posts, extracting stats, saving a user's post history, etc., just to name a few possibilities. Otherwise it requires a second call to the API to get the record you just posted. |
Beta Was this translation helpful? Give feedback.
-
But what about uploaded images and other types of embedded content? That's what I meant by metadata, it's created when you create the post, with URLs on whatever server is being used. If you want to reference it later, by rendering and displaying posts for example, you need to make another call to the API to get the data, if all you have is the CID. |
Beta Was this translation helpful? Give feedback.
-
Maybe we could avoid the network round-trip another way, like Cap'n Proto's time-traveling promise pipelining? https://capnproto.org/rpc.html |
Beta Was this translation helpful? Give feedback.
-
It would not be necessary for Considering the use case of using this endpoint in our app, before using |
Beta Was this translation helpful? Give feedback.
-
It would be very useful if the
com.atproto.repo.createRecord
endpoint returned the actual record in full, instead of just the CID. Both Twitter and Mastodon do this when creating a new post.Beta Was this translation helpful? Give feedback.
All reactions