Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion packages/groqd/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Be sure to keep these first 2 imports in this order:
import "./groq-builder";
import "./commands";
import { createGroqBuilderWithZod } from "./createGroqBuilderWithZod";

// Export all public types:

Expand Down Expand Up @@ -43,7 +44,25 @@ export { createGroqBuilderLite } from "./createGroqBuilder";
export {
GroqBuilderWithZod,
createGroqBuilderWithZod,
createGroqBuilderWithZod as createGroqBuilder,
z,
zod,
} from "./createGroqBuilderWithZod";

/**
* Creates the root `q` query builder.
*
* For convenience, includes all Zod validation methods attached to the `q` object, like `q.string()` etc.
* This ensures an API that's backwards compatible with GroqD v0.x syntax.
*
* If you want to use `z` directly,
* or a different validation library,
* or don't need runtime validation,
* use `createGroqBuilderLite` instead.
*
* @alias createGroqBuilderWithZod
*
* @deprecated
* Use `createGroqBuilderWithZod(...)` instead.
* This method will eventually change to an alias for `createGroqBuilderLite`.
*/
export const createGroqBuilder = createGroqBuilderWithZod;
Loading