-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: added QueryResultType
#64
Conversation
Signed-off-by: Jim Ezesinachi <ezesinachijim@gmail.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes in this pull request involve updates to several JavaScript files and TypeScript definitions. Specifically, the base64-encoded strings for Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (1)
packages/queries/src/query.test.ts (1)
201-246
: LGTM! Comprehensive test coverage for deferred queries.
The new tests thoroughly cover the deferred query functionality with proper type assertions.
Consider consolidating the duplicated Customer
type definition:
+ // At the top of the file
+ type Customer = {
+ email: string | null;
+ first_name: string
+ };
- // Remove duplicate definitions in individual tests
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
- packages/docs/static/reference/assets/navigation.js (1 hunks)
- packages/docs/static/reference/assets/search.js (1 hunks)
- packages/queries/src/query.test.ts (7 hunks)
- packages/queries/src/types/QueryResult.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/docs/static/reference/assets/navigation.js
- packages/docs/static/reference/assets/search.js
🔇 Additional comments (3)
packages/queries/src/query.test.ts (3)
2-9
: LGTM! Import changes are appropriate.
The new imports, particularly QueryResultType
, align well with the PR objectives and are properly organized.
19-23
: LGTM! Helper function is well-structured.
The new fakeQueryResultType
function follows the established pattern and is properly typed. The implementation using type assertion is appropriate for test mocks.
260-271
: LGTM! Well-structured nested deferred query test.
The Language
type correctly models the nested deferred query result structure, and the test properly validates the type relationships.
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.
LGTM
SynthQL pull request template
Why
Added a new utility type that allows a user to extract the inner data return type of a query
What changed
A new utility type in the QueryResult file, and the tests in query.test
Important
Summary by CodeRabbit
New Features
window.navigationData
andwindow.searchData
with new base64-encoded strings, enhancing the data representation.QueryResultType
for improved handling of query results based on specific conditions.Bug Fixes
Actor
andCustomer
.Tests