-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 BigInt primary key routing #20744
Conversation
🦋 Changeset detectedLatest commit: f116552 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@br41nslug Can you review it? |
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.
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.
Using the native BigInt type solves the issue nicely on my end :D
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.
Can confirm as well 🚀
I'd still like to have this covered by a test.
What should the test cover? Just that the BigInt field is returning in the whereClause and the number is not changed? |
@paescuj I would love to see tests for this too however there is unfortunately a reason there are no tests for this currently 😬 This specific logic is hidden away in 3 levels deep of nested function which makes testing this separately very difficult if not impossible without refactoring directus/api/src/utils/apply-query.ts Line 647 in dc30684
|
Nope, I've inserted the value directly into the DB, but apparently it needs to be significantly larger than integer max safe. |
Hmm, I would have thought it to be feasible by passing in a corresponding schema
directus/api/src/utils/apply-query.test.ts Line 126 in dc30684
|
In that case I hope im wrong 😄 |
@paescuj Was the test I wrote good? |
50e0a8b
to
17e9556
Compare
Yes, thank you! ❤️ |
Scope
What's changed:
Potential Risks / Drawbacks
Review Notes / Questions
Fixes #20288