Skip to content

Commit e0db316

Browse files
authored
Merge pull request #255 from objectstack-ai/copilot/prioritize-3-0-upgrade
2 parents f7f155b + 5a9f1bf commit e0db316

File tree

13 files changed

+1786
-4
lines changed

13 files changed

+1786
-4
lines changed

ROADMAP.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The integration of **@object-ui** (6 packages at v2.0.0) marks a strategic shift
3030

3131
## Current State (February 2026)
3232

33-
### Server — ✅ Complete (14 Plugins)
33+
### Server — ✅ Complete (15 Plugins)
3434

3535
| Plugin | Package | Status |
3636
|--------|---------|:------:|
@@ -39,6 +39,7 @@ The integration of **@object-ui** (6 packages at v2.0.0) marks a strategic shift
3939
| Automation | `@objectos/automation` ||
4040
| Browser Runtime | `@objectos/browser` ||
4141
| Cache | `@objectos/cache` ||
42+
| **GraphQL** | **`@objectos/graphql`** | **** |
4243
| i18n | `@objectos/i18n` ||
4344
| Jobs | `@objectos/jobs` ||
4445
| Metrics | `@objectos/metrics` ||
@@ -330,9 +331,9 @@ Complete GraphQL API alongside existing REST endpoints.
330331

331332
| # | Task | Priority | Status |
332333
|---|------|:--------:|:------:|
333-
| O.1.1 | GraphQL schema generation from ObjectStack metadata | 🔴 | |
334-
| O.1.2 | Query resolvers with permission enforcement | 🔴 | |
335-
| O.1.3 | Mutation resolvers with audit logging | 🔴 | |
334+
| O.1.1 | GraphQL schema generation from ObjectStack metadata | 🔴 | |
335+
| O.1.2 | Query resolvers with permission enforcement | 🔴 | |
336+
| O.1.3 | Mutation resolvers with audit logging | 🔴 | |
336337
| O.1.4 | Subscription support via WebSocket | 🟡 ||
337338
| O.1.5 | DataLoader pattern for N+1 prevention | 🟡 ||
338339
| O.1.6 | GraphQL Playground / Explorer integration | 🟢 ||

objectstack.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { StoragePlugin } from '@objectos/storage';
2323
import { TelemetryPlugin } from '@objectos/telemetry';
2424
import { UIPlugin } from '@objectos/ui';
2525
import { WorkflowPlugin } from '@objectos/workflow';
26+
import { GraphQLPlugin } from '@objectos/graphql';
2627
import { resolve } from 'path';
2728

2829
// ─── Example App Bundles ─────────────────────────────────────────
@@ -102,6 +103,9 @@ export default defineStack({
102103
new UIPlugin(),
103104
// createRealtimePlugin(),
104105

106+
// GraphQL Layer (Phase O.1)
107+
new GraphQLPlugin(),
108+
105109
// Example Apps
106110
new AppPlugin(CrmApp),
107111
new AppPlugin(TodoApp),

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"@objectstack/plugin-auth": "3.0.0",
8383
"@objectos/automation": "workspace:*",
8484
"@objectos/cache": "workspace:*",
85+
"@objectos/graphql": "workspace:*",
8586
"@objectos/i18n": "workspace:*",
8687
"@objectos/jobs": "workspace:*",
8788
"@objectos/metrics": "workspace:*",

packages/graphql/jest.config.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
preset: 'ts-jest/presets/default-esm',
3+
testEnvironment: 'node',
4+
extensionsToTreatAsEsm: ['.ts'],
5+
moduleNameMapper: {
6+
'^(\\.{1,2}/.*)\\.js$': '$1',
7+
},
8+
transform: {
9+
'^.+\\.ts$': ['ts-jest', { useESM: true }],
10+
},
11+
roots: ['<rootDir>/test'],
12+
testMatch: ['**/*.test.ts'],
13+
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts']
14+
};

packages/graphql/package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@objectos/graphql",
3+
"version": "0.1.0",
4+
"type": "module",
5+
"license": "AGPL-3.0",
6+
"description": "GraphQL API layer for ObjectOS — auto-generates schema from ObjectStack metadata with permission enforcement and audit logging",
7+
"main": "dist/index.js",
8+
"types": "dist/index.d.ts",
9+
"scripts": {
10+
"build": "tsup src/index.ts --format esm,cjs --clean && tsc --emitDeclarationOnly --declaration",
11+
"test": "jest --forceExit --passWithNoTests"
12+
},
13+
"dependencies": {
14+
"@objectstack/runtime": "^3.0.0",
15+
"@objectstack/spec": "3.0.0",
16+
"graphql": "^16.10.0"
17+
},
18+
"devDependencies": {
19+
"@types/jest": "^30.0.0",
20+
"@types/node": "^25.2.0",
21+
"jest": "^30.2.0",
22+
"ts-jest": "^29.4.6",
23+
"tsup": "^8.5.1",
24+
"typescript": "^5.9.3"
25+
}
26+
}

packages/graphql/src/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @objectos/graphql — GraphQL API Layer for ObjectOS
3+
*
4+
* Auto-generates a GraphQL schema from ObjectStack metadata with:
5+
* - RBAC permission enforcement on every query/mutation
6+
* - Audit logging for all data mutations
7+
* - Paginated list queries with filtering and sorting
8+
* - GraphQL Playground for development
9+
*/
10+
11+
export { GraphQLPlugin } from './plugin.js';
12+
export { generateSchema, toPascalCase } from './schema-generator.js';
13+
export { createResolverCallbacks } from './resolvers.js';
14+
export type {
15+
GraphQLConfig,
16+
ResolvedGraphQLConfig,
17+
GraphQLResolverContext,
18+
ObjectDef,
19+
ObjectFieldDef,
20+
PaginatedResult,
21+
PluginHealthReport,
22+
PluginCapabilityManifest,
23+
PluginSecurityManifest,
24+
PluginStartupResult,
25+
} from './types.js';

0 commit comments

Comments
 (0)