@grafema/api 0.2.11 → 0.3.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,7 +34,7 @@ grafema server graphql --port 4000
34
34
 
35
35
  ```typescript
36
36
  import { createGraphQLServer, startServer } from '@grafema/api';
37
- import { RFDBServerBackend } from '@grafema/core';
37
+ import { RFDBServerBackend } from '@grafema/util';
38
38
 
39
39
  // Connect to RFDB
40
40
  const backend = new RFDBServerBackend({ socketPath: '/tmp/grafema.sock' });
package/dist/context.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Request-scoped context containing backend connection and DataLoaders.
5
5
  */
6
6
  import type { IncomingMessage } from 'node:http';
7
- import type { RFDBServerBackend } from '@grafema/core';
7
+ import type { RFDBServerBackend } from '@grafema/util';
8
8
  import { type DataLoaders } from './dataloaders/index.js';
9
9
  export interface GraphQLContext {
10
10
  /** Graph backend connection */
@@ -4,7 +4,7 @@
4
4
  * Creates all DataLoaders for a request context.
5
5
  * DataLoaders batch and cache database requests within a single GraphQL request.
6
6
  */
7
- import type { RFDBServerBackend } from '@grafema/core';
7
+ import type { RFDBServerBackend } from '@grafema/util';
8
8
  import { createNodeLoader } from './nodeLoader.js';
9
9
  export interface DataLoaders {
10
10
  /** Batch node lookups by ID */
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import DataLoader from 'dataloader';
8
8
  import type { BaseNodeRecord } from '@grafema/types';
9
- import type { RFDBServerBackend } from '@grafema/core';
9
+ import type { RFDBServerBackend } from '@grafema/util';
10
10
  /**
11
11
  * Create a DataLoader for batching node lookups.
12
12
  *
@@ -73,7 +73,7 @@ export declare const resolvers: {
73
73
  results: never[];
74
74
  error: string;
75
75
  }>;
76
- stats(_: unknown, _args: unknown, context: import("../context.js").GraphQLContext): Promise<import("@grafema/core/storage/backends/RFDBServerBackend").BackendStats>;
76
+ stats(_: unknown, _args: unknown, context: import("../context.js").GraphQLContext): Promise<import("@grafema/util/storage/backends/RFDBServerBackend").BackendStats>;
77
77
  analysisStatus(_: unknown, _args: unknown, _context: import("../context.js").GraphQLContext): Promise<{
78
78
  running: boolean;
79
79
  phase: null;
@@ -95,7 +95,7 @@ export declare const queryResolvers: {
95
95
  *
96
96
  * Complexity: O(1) - cached in backend
97
97
  */
98
- stats(_: unknown, _args: unknown, context: GraphQLContext): Promise<import("@grafema/core/storage/backends/RFDBServerBackend").BackendStats>;
98
+ stats(_: unknown, _args: unknown, context: GraphQLContext): Promise<import("@grafema/util/storage/backends/RFDBServerBackend").BackendStats>;
99
99
  /**
100
100
  * Get analysis status.
101
101
  * Placeholder - actual implementation depends on analysis state tracking.
package/dist/server.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Supports cursor-based pagination and query complexity limiting.
6
6
  */
7
7
  import { createServer } from 'node:http';
8
- import type { RFDBServerBackend } from '@grafema/core';
8
+ import type { RFDBServerBackend } from '@grafema/util';
9
9
  export interface GraphQLServerOptions {
10
10
  /** Graph backend (RFDBServerBackend) */
11
11
  backend: RFDBServerBackend;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafema/api",
3
- "version": "0.2.11",
3
+ "version": "0.3.0-beta",
4
4
  "description": "GraphQL API server for Grafema code analysis toolkit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "graphql": "^16.10.0",
34
34
  "graphql-scalars": "^1.24.0",
35
35
  "graphql-yoga": "^5.10.11",
36
- "@grafema/types": "0.2.11",
37
- "@grafema/core": "0.2.11"
36
+ "@grafema/util": "0.3.0-beta",
37
+ "@grafema/types": "0.3.0-beta"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^25.0.8",
package/src/context.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import type { IncomingMessage } from 'node:http';
8
- import type { RFDBServerBackend } from '@grafema/core';
8
+ import type { RFDBServerBackend } from '@grafema/util';
9
9
  import { createDataLoaders, type DataLoaders } from './dataloaders/index.js';
10
10
 
11
11
  export interface GraphQLContext {
@@ -5,7 +5,7 @@
5
5
  * DataLoaders batch and cache database requests within a single GraphQL request.
6
6
  */
7
7
 
8
- import type { RFDBServerBackend } from '@grafema/core';
8
+ import type { RFDBServerBackend } from '@grafema/util';
9
9
  import { createNodeLoader } from './nodeLoader.js';
10
10
 
11
11
  export interface DataLoaders {
@@ -7,7 +7,7 @@
7
7
 
8
8
  import DataLoader from 'dataloader';
9
9
  import type { BaseNodeRecord } from '@grafema/types';
10
- import type { RFDBServerBackend } from '@grafema/core';
10
+ import type { RFDBServerBackend } from '@grafema/util';
11
11
 
12
12
  /**
13
13
  * Create a DataLoader for batching node lookups.
package/src/server.ts CHANGED
@@ -13,7 +13,7 @@ import { fileURLToPath } from 'node:url';
13
13
 
14
14
  import { resolvers } from './resolvers/index.js';
15
15
  import { createContext } from './context.js';
16
- import type { RFDBServerBackend } from '@grafema/core';
16
+ import type { RFDBServerBackend } from '@grafema/util';
17
17
 
18
18
  const __dirname = dirname(fileURLToPath(import.meta.url));
19
19