graphql-server-test 3.3.3 → 3.4.1

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
@@ -181,7 +181,7 @@ The `server.api` option provides full control over the GraphQL server configurat
181
181
 
182
182
  | Property | Type | Default | Description |
183
183
  |----------|------|---------|-------------|
184
- | `scopedRoutingSchema` | `string` | `constructive_routing_public` | Schema that owns `resolve_route()` and the routing tables |
184
+ | `routingSchema` | `string` | `routing_public` | Schema that owns `resolve_route()` and the routing tables |
185
185
  | `exposedSchemas` | `string[]` | from `schemas` | Database schemas to expose (overridden by `schemas`) |
186
186
  | `anonRole` | `string` | from `authRole` | Anonymous role name (overridden by `authRole`) |
187
187
  | `roleName` | `string` | from `authRole` | Default role name (overridden by `authRole`) |
@@ -190,12 +190,12 @@ The `server.api` option provides full control over the GraphQL server configurat
190
190
 
191
191
  The convenience properties (`schemas`, `authRole`) take precedence over corresponding values in `server.api`.
192
192
 
193
- ### Choosing the server (`server.scopedRouting`)
193
+ ### Choosing the server (`server.useRouting`)
194
194
 
195
195
  The harness runs suites against one of two servers:
196
196
 
197
- - `server.scopedRouting: true` (default) — the production `@constructive-io/graphql-server`. Every request resolves through the scoped-routing plane, so the suite must seed real routing/database records and use a real database id.
198
- - `server.scopedRouting: false` — the single-tenant `@constructive-io/graphql-dev-server` (pure PostGraphile, no routing, no database id). It exposes the configured schemas directly and is for local/static suites only.
197
+ - `server.useRouting: true` (default) — the production `@constructive-io/graphql-server`. Every request resolves through the scoped-routing plane, so the suite must seed real routing/database records and use a real database id.
198
+ - `server.useRouting: false` — the single-tenant `@constructive-io/graphql-dev-server` (pure PostGraphile, no routing, no database id). It exposes the configured schemas directly and is for local/static suites only.
199
199
 
200
200
  ```typescript
201
201
  // Basic usage with convenience properties
@@ -208,7 +208,7 @@ const { query } = await getConnections({
208
208
  const { query } = await getConnections({
209
209
  schemas: ['app_public'],
210
210
  server: {
211
- scopedRouting: false
211
+ useRouting: false
212
212
  }
213
213
  });
214
214
 
@@ -219,7 +219,7 @@ const { query } = await getConnections({
219
219
  server: {
220
220
  port: 5555,
221
221
  host: 'localhost',
222
- scopedRouting: true,
222
+ useRouting: true,
223
223
  api: {
224
224
  isPublic: false,
225
225
  metaSchemas: ['constructive_routing_public', 'metaschema_public']
@@ -50,9 +50,9 @@ export const getConnections = async (input, seedAdapters) => {
50
50
  });
51
51
  // Start the HTTP server. Suites default to the production scoped-routing
52
52
  // server; static/single-tenant suites opt into the dev server with
53
- // `server.scopedRouting: false`.
54
- const scopedRouting = input.server?.scopedRouting ?? true;
55
- const server = scopedRouting
53
+ // `server.useRouting: false`.
54
+ const useRouting = input.server?.useRouting ?? true;
55
+ const server = useRouting
56
56
  ? await createTestServer(serverOpts, input.server)
57
57
  : await createDevTestServer(serverOpts, input.server);
58
58
  // Create SuperTest agent
@@ -53,9 +53,9 @@ const getConnections = async (input, seedAdapters) => {
53
53
  });
54
54
  // Start the HTTP server. Suites default to the production scoped-routing
55
55
  // server; static/single-tenant suites opt into the dev server with
56
- // `server.scopedRouting: false`.
57
- const scopedRouting = input.server?.scopedRouting ?? true;
58
- const server = scopedRouting
56
+ // `server.useRouting: false`.
57
+ const useRouting = input.server?.useRouting ?? true;
58
+ const server = useRouting
59
59
  ? await (0, server_1.createTestServer)(serverOpts, input.server)
60
60
  : await (0, server_1.createDevTestServer)(serverOpts, input.server);
61
61
  // Create SuperTest agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-server-test",
3
- "version": "3.3.3",
3
+ "version": "3.4.1",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive GraphQL Server Testing with SuperTest HTTP requests",
6
6
  "main": "index.js",
@@ -31,8 +31,8 @@
31
31
  "devDependencies": {
32
32
  "@0no-co/graphql.web": "^1.2.0",
33
33
  "@agentic-kit/ollama": "2.4.2",
34
- "@constructive-io/graphql-codegen": "^5.2.3",
35
- "@constructive-io/graphql-query": "^4.1.3",
34
+ "@constructive-io/graphql-codegen": "^5.3.1",
35
+ "@constructive-io/graphql-query": "^4.2.1",
36
36
  "@types/express": "^5.0.6",
37
37
  "@types/pg": "^8.20.0",
38
38
  "@types/supertest": "^7.2.0",
@@ -43,18 +43,18 @@
43
43
  "nested-obj": "^0.2.2"
44
44
  },
45
45
  "dependencies": {
46
- "@constructive-io/graphql-dev-server": "^3.3.3",
47
- "@constructive-io/graphql-env": "^3.19.2",
48
- "@constructive-io/graphql-server": "^5.3.3",
49
- "@constructive-io/graphql-types": "^3.18.2",
46
+ "@constructive-io/graphql-dev-server": "^3.4.1",
47
+ "@constructive-io/graphql-env": "^3.20.0",
48
+ "@constructive-io/graphql-server": "^5.4.1",
49
+ "@constructive-io/graphql-types": "^3.19.0",
50
50
  "@constructive-io/upload-client": "0.17.2",
51
51
  "@pgpmjs/types": "^2.37.2",
52
52
  "express": "^5.2.1",
53
- "graphile-schema": "^2.1.3",
53
+ "graphile-schema": "^2.2.1",
54
54
  "graphql": "16.13.0",
55
55
  "pg": "^8.21.0",
56
56
  "pg-cache": "^3.16.2",
57
- "pgsql-test": "^5.1.2",
57
+ "pgsql-test": "^5.1.3",
58
58
  "supertest": "^7.0.0"
59
59
  },
60
60
  "keywords": [
@@ -68,5 +68,5 @@
68
68
  "e2e",
69
69
  "server"
70
70
  ],
71
- "gitHead": "0e3ee42c44c9b35ffac4bf1faa6775eb69311ec4"
71
+ "gitHead": "cc1b2af2c73c23b99a221e6bd8a8ba76c7ce79e6"
72
72
  }
package/types.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface ServerOptions {
21
21
  * (pure PostGraphile, no routing, no database id) exposing the configured
22
22
  * schemas directly. For local/static suites only.
23
23
  */
24
- scopedRouting?: boolean;
24
+ useRouting?: boolean;
25
25
  /**
26
26
  * API configuration options for the GraphQL server.
27
27
  * These options control how the server handles requests and which features are enabled.
@@ -32,7 +32,7 @@ export interface ServerOptions {
32
32
  * schemas: ['app_public'],
33
33
  * server: {
34
34
  * port: 5555,
35
- * scopedRouting: false
35
+ * useRouting: false
36
36
  * }
37
37
  * });
38
38
  * ```