Skip to content
Merged
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
2 changes: 1 addition & 1 deletion examples/cattery-zod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"drizzle-orm": "^0.39.3",
"graphql": "^16.8.1",
"graphql-yoga": "^5.6.0",
"zod": "^3.24.2"
"zod": "4.0.0-beta.20250415T232143"
}
}
5 changes: 2 additions & 3 deletions examples/cattery-zod/src/resolvers/cat.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { field, resolver } from "@gqloom/core"
import { drizzleResolverFactory } from "@gqloom/drizzle"
import { z } from "zod"
import * as z from "zod"
import { useCurrentUser } from "../contexts"
import { db } from "../providers"
import { cats } from "../schema"
Expand All @@ -10,11 +10,10 @@ const catResolverFactory = drizzleResolverFactory(db, "cats")
export const catResolver = resolver.of(cats, {
cats: catResolverFactory.selectArrayQuery(),

age: field(z.number().int())
age: field(z.int())
.derivedFrom("birthday")
.input({
currentYear: z
.number()
.int()
.nullish()
.transform((x) => x ?? new Date().getFullYear()),
Expand Down
2 changes: 1 addition & 1 deletion examples/cattery-zod/src/resolvers/user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mutation, query, resolver } from "@gqloom/core"
import { drizzleResolverFactory } from "@gqloom/drizzle"
import { eq } from "drizzle-orm"
import { z } from "zod"
import * as z from "zod"
import { useCurrentUser } from "../contexts"
import { db } from "../providers"
import { users } from "../schema"
Expand Down
2 changes: 1 addition & 1 deletion examples/middlewares/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"graphql": "^16.8.1",
"graphql-yoga": "^5.6.0",
"valibot": "1.0.0-beta.7",
"zod": "^3.24.0"
"zod": "4.0.0-beta.20250415T232143"
}
}
4 changes: 2 additions & 2 deletions examples/middlewares/src/guard-zod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mutation, resolver } from "@gqloom/zod"
import { z } from "zod"
import { mutation, resolver } from "@gqloom/core"
import * as z from "zod"
import { authGuard } from "./middlewares"

export const AdminResolver = resolver(
Expand Down
2 changes: 1 addition & 1 deletion examples/middlewares/src/zod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createServer } from "node:http"
import { ZodWeaver, query, resolver, weave } from "@gqloom/zod"
import { createYoga } from "graphql-yoga"
import { z } from "zod"
import * as z from "zod"
import { ZodExceptionFilter, outputValidator } from "./middlewares"

const helloResolver = resolver({
Expand Down
2 changes: 1 addition & 1 deletion examples/subscriptions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"graphql": "^16.8.1",
"graphql-yoga": "^5.6.0",
"valibot": "1.0.0-beta.7",
"zod": "^3.24.0"
"zod": "4.0.0-beta.20250415T232143"
}
}
2 changes: 1 addition & 1 deletion examples/subscriptions/src/zod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createServer } from "node:http"
import { query, resolver, subscription, weave } from "@gqloom/zod"
import { createPubSub, createYoga } from "graphql-yoga"
import { z } from "zod"
import * as z from "zod"

const CountdownResolver = resolver({
countdown: subscription(z.number())
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "Create GraphQL schema and resolvers with TypeScript, using Zod, Valibot or Yup!",
"main": "index.js",
"scripts": {
"test": "vitest run --typecheck -u",
"test": "vitest run --typecheck",
"coverage": "vitest run --coverage",
"format": "biome format --write .",
"lint": "biome lint --write .",
"fix": "biome check --write .",
"check": "biome check --write . && pnpm run check:type",
"check:type": "tsc --noEmit",
"check:type": "pnpm -r check:type",
"build": "pnpm -F '@gqloom/core' run build && pnpm -F '@gqloom/drizzle' run build && pnpm -F '@gqloom/federation' run build && pnpm -F '@gqloom/mikro-orm' run build && pnpm -F '@gqloom/prisma' run build && pnpm -F '@gqloom/valibot' -F '@gqloom/yup' -F '@gqloom/zod' run build",
"prepare": "husky",
"compose-up": "docker compose up -d",
Expand Down
1 change: 1 addition & 0 deletions packages/drizzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"scripts": {
"build": "tsup",
"check:type": "tsc --noEmit",
"push": "drizzle-kit push --config=drizzle-mysql.config.ts && drizzle-kit push --config=drizzle-postgres.config.ts && drizzle-kit push --config=drizzle-sqlite.config.ts && drizzle-kit push --config=drizzle-sqlite-1.config.ts"
},
"files": ["dist"],
Expand Down
7 changes: 7 additions & 0 deletions packages/drizzle/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "bundler"
},
"include": ["src", "test"]
}
3 changes: 2 additions & 1 deletion packages/federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
},
"scripts": {
"build": "tsup"
"build": "tsup",
"check:type": "tsc --noEmit"
},
"files": ["dist"],
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/mikro-orm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
},
"scripts": {
"build": "tsup"
"build": "tsup",
"check:type": "tsc --noEmit"
},
"files": ["dist"],
"keywords": ["gqloom", "graphql", "schema", "typescript", "mikro-orm"],
Expand Down
3 changes: 2 additions & 1 deletion packages/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"scripts": {
"build": "tsup",
"check:type": "tsc --noEmit",
"init": "exec prisma migrate dev --name init",
"generate": "pnpm build && prisma generate",
"push": "pnpm build && pnpm generate && pnpm run init"
Expand All @@ -61,7 +62,7 @@
"@prisma/client": "^6.1.0",
"graphql-yoga": "^5.6.0",
"prisma": "^6.1.0",
"zod": "^3.24.1"
"zod": "4.0.0-beta.20250415T232143"
},
"homepage": "https://gqloom.dev/",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prisma/test/resolver-factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
expectTypeOf,
it,
} from "vitest"
import { z } from "zod"
import * as z from "zod"
import {
type InferPrismaDelegate,
type PrismaModelSilk,
Expand Down
7 changes: 0 additions & 7 deletions packages/prisma/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"paths": {
"@gqloom/*": ["../../packages/*/src/index.ts"]
},
"module": "ESNext",
"moduleResolution": "bundler"
},
"include": ["src", "test"]
}
3 changes: 2 additions & 1 deletion packages/valibot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
},
"scripts": {
"build": "tsup"
"build": "tsup",
"check:type": "tsc --noEmit"
},
"files": ["dist"],
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion packages/yup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
},
"scripts": {
"build": "tsup"
"build": "tsup",
"check:type": "tsc --noEmit"
},
"files": ["dist"],
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions packages/zod/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## next (YYYY-MM-DD)

- Feat: Support zod v4

## 0.8.1 (2025-03-23)

- Feat: export all types
Expand Down
19 changes: 15 additions & 4 deletions packages/zod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gqloom/zod",
"version": "0.9.0",
"version": "0.9.0-beta.0",
"description": "Create GraphQL schema and resolvers easily using using Zod!",
"type": "module",
"main": "./dist/index.js",
Expand All @@ -15,10 +15,21 @@
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./v3": {
"import": {
"types": "./dist/v3.d.ts",
"default": "./dist/v3.js"
},
"require": {
"types": "./dist/v3.d.cts",
"default": "./dist/v3.cjs"
}
}
},
"scripts": {
"build": "tsup"
"build": "tsup",
"check:type": "tsc --noEmit"
},
"keywords": [
"gqloom",
Expand All @@ -34,12 +45,12 @@
"peerDependencies": {
"@gqloom/core": ">= 0.9.0",
"graphql": ">= 16.8.0",
"zod": ">= 3.24.0"
"zod": ">= 3.25.0"
},
"files": ["dist"],
"devDependencies": {
"@gqloom/core": "workspace:*",
"zod": "^3.24.1"
"zod": "3.25.17"
},
"homepage": "https://gqloom.dev/",
"repository": {
Expand Down
Loading