-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[graphql] Sort nodes in resolve_assetNodes so they are stable across …
…reload (#17230) ## Summary & Motivation Hey folks - This PR sorts the asset nodes returned from resolve_assetNodes. We believe that instability in the sort order is causing cache invalidation in a few places in the JS and also (maybe?) causing the asset graph layout to change. I've only observed sort differences across "reload definitions" calls, so we could potentially move this sorting to the load step also. I put this at the very end of the resolver after the ids have been generated for each node so the sorter should be a simple property retrieval. If this is slow, we could potentially dig deeper and see if it's the sort order of the repositories that is changing and not of individual assets, but sorting here seems like the best way to make sure the behavior doesn't change in the future. ## How I Tested These Changes Ran existing tests, updated them as necessary Co-authored-by: bengotow <[email protected]>
- Loading branch information
Showing
2 changed files
with
68 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters