Can I fetch a resource with `get :id`?

To fetch a resource by a specific
id
I use this code:

[post] = MyApp.Post
|> Ash.Query.filter(id == "bc38fcb3-080d-46ba-834d-5as58d689sda")
|> Ash.Query.limit(1)
|> MyApp.Api.read!()


Is there a shorter already build in way of fetching a single resource by it's
id
?
Was this page helpful?