Skip to content

Commit a6f174b

Browse files
Copilothotlong
andcommitted
docs: replace placeholder variables with concrete driver instances in code examples
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 6f1782f commit a6f174b

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

content/blog/security-by-design.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,12 @@ When using `@objectstack/plugin-hono-server`, CSRF protection is enabled by defa
407407
```typescript
408408
import { ObjectStackKernel } from '@objectstack/runtime';
409409
import { HonoServerPlugin } from '@objectstack/plugin-hono-server';
410+
import { ObjectQLPlugin } from '@objectql/core';
411+
import { MemoryDriver } from '@objectql/driver-memory';
410412

411413
const kernel = new ObjectStackKernel([
412414
appConfig,
413-
myDriver,
415+
new MemoryDriver(),
414416
new ObjectQLPlugin(),
415417
new HonoServerPlugin({
416418
port: 3000,

content/docs/reference/api/attachments.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,11 @@ ObjectQL provides a flexible file storage abstraction that supports multiple bac
10841084
import { ObjectStackKernel } from '@objectstack/runtime';
10851085
import { HonoServerPlugin } from '@objectstack/plugin-hono-server';
10861086
import { ObjectQLPlugin } from '@objectql/core';
1087+
import { SqlDriver } from '@objectql/driver-sql';
10871088

10881089
const kernel = new ObjectStackKernel([
10891090
appConfig,
1090-
myDriver,
1091+
new SqlDriver({ client: 'sqlite3', connection: { filename: ':memory:' } }),
10911092
new ObjectQLPlugin(),
10921093
new HonoServerPlugin({
10931094
port: 3000,
@@ -1107,7 +1108,7 @@ await kernel.start();
11071108
```typescript
11081109
const kernel = new ObjectStackKernel([
11091110
appConfig,
1110-
myDriver,
1111+
new SqlDriver({ client: 'sqlite3', connection: { filename: ':memory:' } }),
11111112
new ObjectQLPlugin(),
11121113
new HonoServerPlugin({
11131114
port: 3000,

content/docs/reference/api/custom-routes.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ Configure custom routes when creating the Kernel with protocol plugins:
3131
```typescript
3232
import { ObjectStackKernel } from '@objectstack/runtime';
3333
import { HonoServerPlugin } from '@objectstack/plugin-hono-server';
34+
import { ObjectQLPlugin } from '@objectql/core';
3435
import { JSONRPCPlugin } from '@objectql/protocol-json-rpc';
36+
import { MemoryDriver } from '@objectql/driver-memory';
3537

3638
// Define custom routes via plugin configuration
3739
const kernel = new ObjectStackKernel([
3840
appConfig,
39-
myDriver,
41+
new MemoryDriver(),
4042
new ObjectQLPlugin(),
4143
new JSONRPCPlugin({ basePath: '/v1/rpc' }),
4244
new HonoServerPlugin({

content/docs/reference/api/graphql.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,14 @@ function UserList() {
903903
ObjectQL doesn't include GraphQL Playground by default, but you can easily add it:
904904

905905
```typescript
906+
import { ObjectStackKernel } from '@objectstack/runtime';
906907
import { GraphQLPlugin } from '@objectql/protocol-graphql';
908+
import { ObjectQLPlugin } from '@objectql/core';
909+
import { MemoryDriver } from '@objectql/driver-memory';
907910

908911
const kernel = new ObjectStackKernel([
909-
myDriver,
912+
appConfig,
913+
new MemoryDriver(),
910914
new ObjectQLPlugin(),
911915
new GraphQLPlugin({
912916
port: 4000,

0 commit comments

Comments
 (0)