graphql-server-test 3.0.3 → 3.1.0
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 +6 -5
- package/package.json +11 -11
- package/types.d.ts +3 -3
package/README.md
CHANGED
|
@@ -181,7 +181,8 @@ The `server.api` option provides full control over the GraphQL server configurat
|
|
|
181
181
|
|
|
182
182
|
| Property | Type | Default | Description |
|
|
183
183
|
|----------|------|---------|-------------|
|
|
184
|
-
| `
|
|
184
|
+
| `enableScopedRouting` | `boolean` | package default | Resolve host routing through the scoped plane (`constructive_routing_public.resolve_route`); disable for static single-tenant mode |
|
|
185
|
+
| `scopedRoutingSchema` | `string` | `constructive_routing_public` | Schema that owns `resolve_route()` and the routing tables |
|
|
185
186
|
| `exposedSchemas` | `string[]` | from `schemas` | Database schemas to expose (overridden by `schemas`) |
|
|
186
187
|
| `anonRole` | `string` | from `authRole` | Anonymous role name (overridden by `authRole`) |
|
|
187
188
|
| `roleName` | `string` | from `authRole` | Default role name (overridden by `authRole`) |
|
|
@@ -198,12 +199,12 @@ const { query } = await getConnections({
|
|
|
198
199
|
authRole: 'anonymous'
|
|
199
200
|
});
|
|
200
201
|
|
|
201
|
-
//
|
|
202
|
+
// Static single-tenant mode for testing (bypasses host route resolution)
|
|
202
203
|
const { query } = await getConnections({
|
|
203
204
|
schemas: ['app_public'],
|
|
204
205
|
server: {
|
|
205
206
|
api: {
|
|
206
|
-
|
|
207
|
+
enableScopedRouting: false
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
});
|
|
@@ -216,10 +217,10 @@ const { query } = await getConnections({
|
|
|
216
217
|
port: 5555,
|
|
217
218
|
host: 'localhost',
|
|
218
219
|
api: {
|
|
219
|
-
|
|
220
|
+
enableScopedRouting: false,
|
|
220
221
|
isPublic: false,
|
|
221
222
|
defaultDatabaseId: 'my-test-db',
|
|
222
|
-
metaSchemas: ['
|
|
223
|
+
metaSchemas: ['constructive_routing_public', 'metaschema_public']
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
226
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-server-test",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
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.3.0",
|
|
34
|
-
"@constructive-io/graphql-codegen": "^5.0
|
|
35
|
-
"@constructive-io/graphql-query": "^4.0.
|
|
34
|
+
"@constructive-io/graphql-codegen": "^5.1.0",
|
|
35
|
+
"@constructive-io/graphql-query": "^4.0.5",
|
|
36
36
|
"@types/express": "^5.0.6",
|
|
37
37
|
"@types/pg": "^8.20.0",
|
|
38
38
|
"@types/supertest": "^7.2.0",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"nested-obj": "^0.2.2"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@constructive-io/graphql-env": "^3.
|
|
47
|
-
"@constructive-io/graphql-server": "^5.0
|
|
48
|
-
"@constructive-io/graphql-types": "^3.
|
|
46
|
+
"@constructive-io/graphql-env": "^3.17.0",
|
|
47
|
+
"@constructive-io/graphql-server": "^5.1.0",
|
|
48
|
+
"@constructive-io/graphql-types": "^3.16.0",
|
|
49
49
|
"@constructive-io/upload-client": "0.16.0",
|
|
50
|
-
"@pgpmjs/types": "^2.
|
|
50
|
+
"@pgpmjs/types": "^2.36.0",
|
|
51
51
|
"express": "^5.2.1",
|
|
52
|
-
"graphile-schema": "^2.0.
|
|
52
|
+
"graphile-schema": "^2.0.5",
|
|
53
53
|
"graphql": "16.13.0",
|
|
54
54
|
"pg": "^8.21.0",
|
|
55
|
-
"pg-cache": "^3.15.
|
|
56
|
-
"pgsql-test": "^5.0.
|
|
55
|
+
"pg-cache": "^3.15.3",
|
|
56
|
+
"pgsql-test": "^5.0.5",
|
|
57
57
|
"supertest": "^7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"e2e",
|
|
68
68
|
"server"
|
|
69
69
|
],
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "39db6d576bce7bc1de8123849f237b1695779d88"
|
|
71
71
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiOptions, GraphileOptions } from '@constructive-io/graphql-types';
|
|
2
2
|
import type { DocumentNode, GraphQLError } from 'graphql';
|
|
3
|
+
import type { Server } from 'http';
|
|
3
4
|
import type { PgTestClient } from 'pgsql-test/test-client';
|
|
4
|
-
import type { GraphileOptions, ApiOptions } from '@constructive-io/graphql-types';
|
|
5
5
|
import type supertest from 'supertest';
|
|
6
6
|
/**
|
|
7
7
|
* Options for creating a test server
|
|
@@ -22,7 +22,7 @@ export interface ServerOptions {
|
|
|
22
22
|
* server: {
|
|
23
23
|
* port: 5555,
|
|
24
24
|
* api: {
|
|
25
|
-
*
|
|
25
|
+
* enableScopedRouting: false,
|
|
26
26
|
* isPublic: false,
|
|
27
27
|
* defaultDatabaseId: 'my-database'
|
|
28
28
|
* }
|