@constructive-io/graphql-server 4.9.0 → 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;
@@ -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.9.0",
3
+ "version": "4.10.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive GraphQL Server",
6
6
  "main": "index.js",
@@ -89,5 +89,5 @@
89
89
  "nodemon": "^3.1.14",
90
90
  "ts-node": "^10.9.2"
91
91
  },
92
- "gitHead": "1ade5f10df8e38a5f87bbd2e2f7ec2ba97267079"
92
+ "gitHead": "180ba9eed8414667a0d6dcef99ca4bb988c73bbd"
93
93
  }