It's perfectly valid to want to only get the ID of a resource. But considering they're automatically selected, it gets a bit confusing.
You can't just: data => data.resource because you have to call resource. You can't just do data.resource() either cause that throws a type error. If it didn't, it would be very misleading as you think it would automatically get all the primitives within resource.
I don't want to allow developers to be able to do data => data.resource.id because in other cases if they see it in the list of available fields, it gives the impression that they'd have to select it manually.
It's perfectly valid to want to only get the ID of a resource. But considering they're automatically selected, it gets a bit confusing.
You can't just:
data => data.resource
because you have to callresource
. You can't just dodata.resource()
either cause that throws a type error. If it didn't, it would be very misleading as you think it would automatically get all the primitives withinresource
.I don't want to allow developers to be able to do
data => data.resource.id
because in other cases if they see it in the list of available fields, it gives the impression that they'd have to select it manually.