@constructive-io/graphql-server 5.1.0 → 5.1.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 +10 -9
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -99,20 +99,20 @@ For the operational workflow, sampler output, and heap snapshot usage, see [docs
|
|
|
99
99
|
- `GET /debug/memory` -> memory/process/Graphile debug snapshot when observability is enabled
|
|
100
100
|
- `GET /debug/db` -> PostgreSQL activity/locks/pool debug snapshot when observability is enabled
|
|
101
101
|
|
|
102
|
-
##
|
|
102
|
+
## Scoped routing
|
|
103
103
|
|
|
104
|
-
When `
|
|
104
|
+
When `API_ENABLE_SCOPED_ROUTING=true` (default):
|
|
105
105
|
|
|
106
|
-
- The server resolves
|
|
106
|
+
- The server resolves the request host with a single `resolve_route()` call against the compiled route bindings in the scoped routing schema (`API_SCOPED_ROUTING_SCHEMA`, default `constructive_routing_public`), mapping host → tenant/api/database/role.
|
|
107
107
|
- Only APIs where `api.is_public` matches `API_IS_PUBLIC` are served.
|
|
108
108
|
- In private mode (`API_IS_PUBLIC=false`), you can override with headers:
|
|
109
109
|
- `X-Api-Name` + `X-Database-Id`
|
|
110
110
|
- `X-Schemata` + `X-Database-Id`
|
|
111
111
|
- `X-Meta-Schema` + `X-Database-Id`
|
|
112
112
|
|
|
113
|
-
When `
|
|
113
|
+
When `API_ENABLE_SCOPED_ROUTING=false` (static single-tenant mode):
|
|
114
114
|
|
|
115
|
-
- The server skips
|
|
115
|
+
- The server skips route resolution and serves the fixed schemas in `API_EXPOSED_SCHEMAS`.
|
|
116
116
|
- Roles and database IDs come from `API_ANON_ROLE`, `API_ROLE_NAME`, and `API_DEFAULT_DATABASE_ID`.
|
|
117
117
|
|
|
118
118
|
## Configuration
|
|
@@ -130,13 +130,14 @@ Configuration is merged from defaults, config files, and env vars via `@construc
|
|
|
130
130
|
| `FEATURES_SIMPLE_INFLECTION` | Enable simple inflection | `true` |
|
|
131
131
|
| `FEATURES_OPPOSITE_BASE_NAMES` | Enable opposite base names | `true` |
|
|
132
132
|
| `FEATURES_POSTGIS` | Enable PostGIS support | `true` |
|
|
133
|
-
| `
|
|
133
|
+
| `API_ENABLE_SCOPED_ROUTING` | Enable scoped routing | `true` |
|
|
134
|
+
| `API_SCOPED_ROUTING_SCHEMA` | Schema containing `resolve_route()` | `constructive_routing_public` |
|
|
134
135
|
| `API_IS_PUBLIC` | Serve public APIs only | `true` |
|
|
135
|
-
| `API_EXPOSED_SCHEMAS` | Schemas when
|
|
136
|
-
| `API_META_SCHEMAS` | Meta schemas to query | `
|
|
136
|
+
| `API_EXPOSED_SCHEMAS` | Schemas when scoped routing is disabled | empty |
|
|
137
|
+
| `API_META_SCHEMAS` | Meta schemas to query | `constructive_routing_public,metaschema_public,metaschema_modules_public` |
|
|
137
138
|
| `API_ANON_ROLE` | Anonymous role name | `administrator` |
|
|
138
139
|
| `API_ROLE_NAME` | Authenticated role name | `administrator` |
|
|
139
|
-
| `API_DEFAULT_DATABASE_ID` | Default database ID |
|
|
140
|
+
| `API_DEFAULT_DATABASE_ID` | Default database ID | unset |
|
|
140
141
|
| `GRAPHQL_OBSERVABILITY_ENABLED` | Master switch for debug routes and sampler | `false` |
|
|
141
142
|
| `GRAPHQL_DEBUG_SAMPLER_ENABLED` | Enables periodic NDJSON sampling when observability is on | `true` |
|
|
142
143
|
| `GRAPHQL_DEBUG_SAMPLER_INTERVAL_MS` | Sampler interval in milliseconds | `10000` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-server",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive GraphQL Server",
|
|
6
6
|
"main": "index.js",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@constructive-io/csrf": "^0.17.0",
|
|
45
|
-
"@constructive-io/express-context": "^0.13.
|
|
46
|
-
"@constructive-io/graphql-env": "^3.17.
|
|
47
|
-
"@constructive-io/graphql-types": "^3.16.
|
|
45
|
+
"@constructive-io/express-context": "^0.13.1",
|
|
46
|
+
"@constructive-io/graphql-env": "^3.17.1",
|
|
47
|
+
"@constructive-io/graphql-types": "^3.16.1",
|
|
48
48
|
"@constructive-io/query-builder": "^3.0.1",
|
|
49
49
|
"@constructive-io/s3-utils": "^2.20.0",
|
|
50
50
|
"@constructive-io/url-domains": "^2.19.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@pgpmjs/logger": "^2.14.0",
|
|
54
54
|
"@pgpmjs/server-utils": "^3.15.4",
|
|
55
55
|
"@pgpmjs/types": "^2.36.0",
|
|
56
|
-
"agentic-server": "0.11.
|
|
56
|
+
"agentic-server": "0.11.4",
|
|
57
57
|
"cors": "^2.8.6",
|
|
58
58
|
"deepmerge": "^4.3.1",
|
|
59
59
|
"express": "^5.2.1",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"graphile-build-pg": "5.0.2",
|
|
65
65
|
"graphile-cache": "^4.0.1",
|
|
66
66
|
"graphile-config": "1.0.1",
|
|
67
|
-
"graphile-function-bindings": "^1.0.
|
|
68
|
-
"graphile-settings": "^6.0.
|
|
67
|
+
"graphile-function-bindings": "^1.0.6",
|
|
68
|
+
"graphile-settings": "^6.0.6",
|
|
69
69
|
"graphile-utils": "5.0.1",
|
|
70
70
|
"graphql": "16.13.0",
|
|
71
71
|
"graphql-upload": "^13.0.0",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"@types/pg": "^8.20.0",
|
|
88
88
|
"@types/request-ip": "^0.0.41",
|
|
89
89
|
"cookie-parser": "^1.4.7",
|
|
90
|
-
"graphile-test": "5.0.
|
|
90
|
+
"graphile-test": "5.0.6",
|
|
91
91
|
"makage": "^0.3.0",
|
|
92
92
|
"nodemon": "^3.1.14",
|
|
93
93
|
"ts-node": "^10.9.2"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "ebba3f838664032e6f6adf6c9c6d2b6cdddd994a"
|
|
96
96
|
}
|