-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(index): Provide a similar API to Query #9193
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
packages/core/types/src/index/query-config/query-input-config.ts
Outdated
Show resolved
Hide resolved
query<const TEntry extends string>( | ||
config: IndexQueryConfig<TEntry> | ||
): Promise<any[]> | ||
queryAndCount<const TEntry extends string, Test = IndexQueryConfig<TEntry>>( |
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.
question: Can we kill this queryAndCount
and return the same shape as query.graph
?
const { data, metadata } = ...
Count would be part of metadata. Wdyt?
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.
Yes we can def do that 👍 i dont see any issues
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.
Nice work, few comments 💪
"test": "jest --passWithNoTests ./src", | ||
"test:integration": "jest --runInBand --forceExit -- integration-tests/**/__tests__/**/*.ts", | ||
"test:integration": "jest --runInBand --forceExit -- integration-tests/__tests__/index-engine-module.spec.ts", |
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.
todo: rm
this.storageProvider_, | ||
args | ||
) | ||
async queryAndCount<const TEntry extends string>( |
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.
todo(if-possible): Remove in favor of unified return shape as discussed above
|
||
queryAndCount(...args): unknown | ||
queryAndCount<const TEntry extends string>( |
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.
same
What
Align the index engine API to be similar to the Query API
Example