-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(QueriesObserver): include default options on duplicate query, queryHash check #8432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. can you please add a test that fails on main
but works with your fix so that we don’t introduce a regression later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I missed that this was behind the env check. It’s fine without a test 👍
View your CI Pipeline Execution ↗ for commit c6c4c61.
☁️ Nx Cloud last updated this comment at |
This commit fixes the issue logged here
fixes #8431
The duplicate keys check occurs prior to default options being set on the queries which generates the queryHash.
The below contains 2 unique query key's. However the duplicate keys warning logs since these queries are checked as-is and they do not yet have a queryHash.
const observer = new QueriesObserver(queryClient, [ { queryKey: [ 'Hippo', 'Layout', 'detail', 'id1', ], }, { queryKey: [ 'Hippo', 'Layout', 'detail', 'id2', ], }, ])