-
Notifications
You must be signed in to change notification settings - Fork 305
[core] Support renaming and caching in visibility transforms. #7200
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
[core] Support renaming and caching in visibility transforms. #7200
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes here
|
…ility-cache-renaming
…ility-cache-renaming
This PR adds some features and fixes a couple of bugs in the visibility transforms.
@withVisibilityFilter
now accepts anameTemplate
optional argument that is used to rename named types as they are transformed.@withVisibilityFilter
now correctly completely ignores any type that is not subject to visibility transforms. Previously, it was still mutating/cloning types that were not subject to the transform, like Scalar types, even if it didn't transform them.@withVisibilityFilter
now caches transforms so that applications of the same visibility filter with the same name template now return identical result objects, reducing the number of structurally equivalent models/unions that are created.@withVisibilityFilter
now correctly considers the indexer of Model types, allowing it to work correctly on Array and Record types.@withLifecycleUpdate
also receives the above modifications.Confirmed that this addresses the following issues in a local playground instance.
Closes #7016
Closes #7072
TODO before merging: