@constructive-io/graphql-server 4.8.4 → 4.10.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.
|
@@ -128,6 +128,14 @@ const buildPreset = (connectionString, schemas, anonRole, roleName) => ({
|
|
|
128
128
|
// In grafserv/express/v4, the request is available at requestContext.expressv4.req
|
|
129
129
|
const req = requestContext?.expressv4?.req;
|
|
130
130
|
const context = {};
|
|
131
|
+
// Schema naming strategy settings (for local development).
|
|
132
|
+
// See constructive-db: get_available_schema_hash / create_schema_trigger.
|
|
133
|
+
if (process.env.CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES) {
|
|
134
|
+
context['constructive.simple_schema_names'] = process.env.CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES;
|
|
135
|
+
}
|
|
136
|
+
if (process.env.CONSTRUCTIVE_SCHEMA_USE_UNDERSCORES) {
|
|
137
|
+
context['constructive.schema_use_underscores'] = process.env.CONSTRUCTIVE_SCHEMA_USE_UNDERSCORES;
|
|
138
|
+
}
|
|
131
139
|
if (req) {
|
|
132
140
|
if (req.databaseId) {
|
|
133
141
|
context['jwt.claims.database_id'] = req.databaseId;
|
package/middleware/graphile.js
CHANGED
|
@@ -137,6 +137,14 @@ const buildPreset = (connectionString, schemas, anonRole, roleName) => ({
|
|
|
137
137
|
// In grafserv/express/v4, the request is available at requestContext.expressv4.req
|
|
138
138
|
const req = requestContext?.expressv4?.req;
|
|
139
139
|
const context = {};
|
|
140
|
+
// Schema naming strategy settings (for local development).
|
|
141
|
+
// See constructive-db: get_available_schema_hash / create_schema_trigger.
|
|
142
|
+
if (process.env.CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES) {
|
|
143
|
+
context['constructive.simple_schema_names'] = process.env.CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES;
|
|
144
|
+
}
|
|
145
|
+
if (process.env.CONSTRUCTIVE_SCHEMA_USE_UNDERSCORES) {
|
|
146
|
+
context['constructive.schema_use_underscores'] = process.env.CONSTRUCTIVE_SCHEMA_USE_UNDERSCORES;
|
|
147
|
+
}
|
|
140
148
|
if (req) {
|
|
141
149
|
if (req.databaseId) {
|
|
142
150
|
context['jwt.claims.database_id'] = req.databaseId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive GraphQL Server",
|
|
6
6
|
"main": "index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"graphile-build-pg": "5.0.0-rc.5",
|
|
62
62
|
"graphile-cache": "^3.3.2",
|
|
63
63
|
"graphile-config": "1.0.0-rc.5",
|
|
64
|
-
"graphile-settings": "^4.
|
|
64
|
+
"graphile-settings": "^4.9.0",
|
|
65
65
|
"graphile-utils": "5.0.0-rc.5",
|
|
66
66
|
"graphql": "^16.13.0",
|
|
67
67
|
"graphql-upload": "^13.0.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"nodemon": "^3.1.14",
|
|
90
90
|
"ts-node": "^10.9.2"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "180ba9eed8414667a0d6dcef99ca4bb988c73bbd"
|
|
93
93
|
}
|