Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching references after the build #420

Open
seancdavis opened this issue Apr 11, 2023 · 0 comments
Open

Attaching references after the build #420

seancdavis opened this issue Apr 11, 2023 · 0 comments

Comments

@seancdavis
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants