Skip to content

feat: support custom includes post-processing functions#424

Merged
mattpolzin merged 2 commits intobeam-community:mainfrom
opallabs:post-process-includes
May 5, 2026
Merged

feat: support custom includes post-processing functions#424
mattpolzin merged 2 commits intobeam-community:mainfrom
opallabs:post-process-includes

Conversation

@mattpolzin
Copy link
Copy Markdown
Member

It's nice that this library deduplicates included resources by default but sometimes that isn't quite enough.

Using Enum.uniq/1 works if all instances of a given resource are serialized to the same degree, but sometimes two instances with a given identity (same id and type) will have different serialized relationships because of preloading data at different levels.

In this case and possibly others, it would be nice to be able to provide a custom function that post-processes the includes instead of relying on Enum.uniq/1.

@mattpolzin mattpolzin requested a review from a team as a code owner April 25, 2026 01:14
@mattpolzin mattpolzin merged commit aa4eb82 into beam-community:main May 5, 2026
9 of 10 checks passed
@mattpolzin mattpolzin deleted the post-process-includes branch May 5, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant