Skip to content

Conversation

@rohandhruva
Copy link
Contributor

When using @typePolicy and @fieldPolicy, I noticed a few cache misses because the keyFields and keyArgs were not in the same order. When generating a CacheKey in the CacheResolver, the generated key was bar+foo, whereas the type policy generated it as foo+bar.

This PR uses deterministic sorting in both the keyFields of a type policy and keyArgs of a field policy.

@rohandhruva rohandhruva force-pushed the rdhruva/deterministic_sort branch from 1c57060 to f837f3b Compare October 22, 2025 19:04
@rohandhruva rohandhruva force-pushed the rdhruva/deterministic_sort branch from 3cc1e5e to cd0be1f Compare October 22, 2025 19:56
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