You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simple version of this is that I have two document types and I want to cache some static field on a document after the build has completed.
For example, let's say I have tags and posts, and I want a tag object to have a postCount attribute that caches the number of posts to which the tag was applied.
The more complex example is to be able to "hydrate" references without needing to write my own transformer function.
In the example above, posts would have a tags field reference. But I'd love if what were returned was of type Tag[] rather than string[].
Having both together would be ideal.
The text was updated successfully, but these errors were encountered:
The simple version of this is that I have two document types and I want to cache some static field on a document after the build has completed.
For example, let's say I have tags and posts, and I want a tag object to have a
postCount
attribute that caches the number of posts to which the tag was applied.The more complex example is to be able to "hydrate" references without needing to write my own transformer function.
In the example above, posts would have a
tags
field reference. But I'd love if what were returned was of typeTag[]
rather thanstring[]
.Having both together would be ideal.
The text was updated successfully, but these errors were encountered: