Skip to content

Commit

Permalink
groq-builder: feature(compat): fixed @deprecated notices for grab
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrippey committed Dec 18, 2023
1 parent 977f897 commit 640ba24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 8 additions & 12 deletions packages/groq-builder/src/commands/grab-deprecated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,20 @@ import { GroqBuilder } from "../groq-builder";
declare module "../groq-builder" {
export interface GroqBuilder<TResult, TRootConfig> {
/**
* This method has been renamed to 'project' and will be removed in a future version.
* @deprecated
* */
* @deprecated This method has been renamed to 'project' and will be removed in a future version.
*/
grab: GroqBuilder<TResult, TRootConfig>["project"];
/**
* This method has been renamed to 'project' and will be removed in a future version.
* @deprecated
* */
* @deprecated This method has been renamed to 'project' and will be removed in a future version.
*/
grab$: GroqBuilder<TResult, TRootConfig>["project"];
/**
* This method has been renamed to 'field' and will be removed in a future version.
* @deprecated
* */
* @deprecated This method has been renamed to 'field' and will be removed in a future version.
*/
grabOne: GroqBuilder<TResult, TRootConfig>["field"];
/**
* This method has been renamed to 'field' and will be removed in a future version.
* @deprecated
* */
* @deprecated This method has been renamed to 'field' and will be removed in a future version.
*/
grabOne$: GroqBuilder<TResult, TRootConfig>["field"];
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/groq-builder/src/groq-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("GroqBuilder", () => {
describe("getProductBySlug", () => {
const getProductBySlug = q.star
.filterByType("product")
.any("[slug.current == $slug]")
.filter("slug.current == $slug")
.grab((q) => ({
_id: true,
name: true,
Expand Down

0 comments on commit 640ba24

Please sign in to comment.