From f7f9e12c34e7e6e7a68b9d6dc7b2cd6bb66723d9 Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:26:04 +0000 Subject: [PATCH 1/6] style(sdk): drop unnecessary constructor from kuzu test fake --- packages/sdk/tests/driver-kuzu.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/sdk/tests/driver-kuzu.test.ts b/packages/sdk/tests/driver-kuzu.test.ts index df43942..18911e2 100644 --- a/packages/sdk/tests/driver-kuzu.test.ts +++ b/packages/sdk/tests/driver-kuzu.test.ts @@ -28,7 +28,6 @@ const fake = vi.hoisted(() => { // Like the real package: parameters only go through prepare and execute class FakeConnection { - constructor(_db: unknown) {} async query(cypher: string) { state.statements.push({ cypher }); if (state.queryError) throw state.queryError; From 03d50770917ffbbab11dca7ce533bf25c017f54e Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:27:09 +0000 Subject: [PATCH 2/6] style(examples): replace non-null assertions with optional chaining in configuration example --- examples/configuration/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/configuration/src/index.ts b/examples/configuration/src/index.ts index beb632b..eaa87fa 100644 --- a/examples/configuration/src/index.ts +++ b/examples/configuration/src/index.ts @@ -25,9 +25,9 @@ const config = defineConfig({ console.log('--- defineConfig ---'); console.log(' schema:', config.schema); -console.log(' output.directory:', config.output!.directory); -console.log(' output.zod:', config.output!.zod); -console.log(' driver.type:', config.driver!.type); +console.log(' output.directory:', config.output?.directory); +console.log(' output.zod:', config.output?.zod); +console.log(' driver.type:', config.driver?.type); console.log(' debug:', config.debug); // --------------------------------------------------------------------------- @@ -47,7 +47,7 @@ console.log('\n--- loadConfig ---'); const loaded = await loadConfig('./graph.config.ts'); if (loaded) { console.log(' loaded schema:', loaded.schema); - console.log(' loaded driver type:', loaded.driver!.type); + console.log(' loaded driver type:', loaded.driver?.type); } else { console.log(' no config file found (skipped)'); } From da59dec33ae9d38589a7350a779a110e5472159e Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:27:16 +0000 Subject: [PATCH 3/6] style(examples): remove unused relation import from crud schema --- examples/crud-operations/src/schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/crud-operations/src/schema.ts b/examples/crud-operations/src/schema.ts index b7036bd..a321f11 100644 --- a/examples/crud-operations/src/schema.ts +++ b/examples/crud-operations/src/schema.ts @@ -1,5 +1,5 @@ // schema.ts - CRUD example schema -import { date, node, number, relation, schema as sch, string } from '@graph-kit/sdk'; +import { date, node, number, schema as sch, string } from '@graph-kit/sdk'; export const User = node('User') .add('id', string({ primary: true })) From 550148ad9987202e1db0225ff74065afa818915d Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:28:56 +0000 Subject: [PATCH 4/6] style(examples): stop assigning unused create results in relations example --- examples/relations/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/relations/src/index.ts b/examples/relations/src/index.ts index 9e448f9..b4abe68 100644 --- a/examples/relations/src/index.ts +++ b/examples/relations/src/index.ts @@ -20,16 +20,16 @@ async function main() { try { await client.raw("MATCH (n) WHERE n.id STARTS WITH 'rel-' DETACH DELETE n"); - const alice = await client.create('User', { + await client.create('User', { data: { id: 'rel-alice', name: 'Alice', email: 'alice@example.com' }, }); - const bob = await client.create('User', { + await client.create('User', { data: { id: 'rel-bob', name: 'Bob', email: 'bob@example.com' }, }); - const carol = await client.create('User', { + await client.create('User', { data: { id: 'rel-carol', name: 'Carol', email: 'carol@example.com' }, }); - const post = await client.create('Post', { + await client.create('Post', { data: { id: 'rel-post-1', title: 'Hello Graph', published: true }, }); From 8e47d5275879c11ebde41f4583558681b3b81cbe Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:29:02 +0000 Subject: [PATCH 5/6] style(examples): remove unused updateSchema and import in zod example --- examples/zod-validation/src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/zod-validation/src/index.ts b/examples/zod-validation/src/index.ts index bae0ea6..f4cb375 100644 --- a/examples/zod-validation/src/index.ts +++ b/examples/zod-validation/src/index.ts @@ -3,7 +3,7 @@ // Does NOT require a database. import { date, node, number, schema as sch, string } from '@graph-kit/sdk'; -import { toCreateSchema, toUpdateSchema, validateCreate, validateUpdate } from '@graph-kit/zod'; +import { toCreateSchema, validateCreate, validateUpdate } from '@graph-kit/zod'; import type { z } from 'zod'; // --------------------------------------------------------------------------- @@ -25,7 +25,6 @@ const graph = sch().add('User', User).build(); // --------------------------------------------------------------------------- const createSchema = toCreateSchema(User); -const updateSchema = toUpdateSchema(User); // Custom Zod refinement: email must contain "@" const createSchemaWithRefine = createSchema.refine( From efc591fd0c33f88da3f6098b971f93471426bb6a Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Thu, 12 Nov 2026 18:29:08 +0000 Subject: [PATCH 6/6] style(examples): mark createDriver import as intentional in multi-driver example --- examples/multi-driver/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/multi-driver/src/index.ts b/examples/multi-driver/src/index.ts index ca59e64..0205659 100644 --- a/examples/multi-driver/src/index.ts +++ b/examples/multi-driver/src/index.ts @@ -74,6 +74,7 @@ async function main() { console.log('\n--- createDriver registry ---'); const { createDriver } = await import('@graph-kit/sdk/driver'); + void createDriver; // keeps the dynamic import (and its factory) as a live check console.log('drivers available via the createDriver() factory'); console.log('\nMulti-driver example complete.');