@constructive-io/graphql-server 4.5.1 → 4.6.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/esm/middleware/upload.js +2 -2
- package/middleware/upload.js +2 -2
- package/package.json +4 -3
package/esm/middleware/upload.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Logger } from '@pgpmjs/logger';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import multer from 'multer';
|
|
4
4
|
import os from 'os';
|
|
5
|
-
import {
|
|
5
|
+
import { QuoteUtils } from '@pgsql/quotes';
|
|
6
6
|
import { getPgPool } from 'pg-cache';
|
|
7
7
|
import pgQueryContext from 'pg-query-context';
|
|
8
8
|
import { streamToStorage } from 'graphile-settings';
|
|
@@ -191,7 +191,7 @@ export const createUploadAuthenticateMiddleware = (opts) => {
|
|
|
191
191
|
const result = await pgQueryContext({
|
|
192
192
|
client: pool,
|
|
193
193
|
context,
|
|
194
|
-
query: `SELECT * FROM ${
|
|
194
|
+
query: `SELECT * FROM ${QuoteUtils.quoteQualifiedIdentifier(privateSchema, authFn)}($1)`,
|
|
195
195
|
variables: [authToken],
|
|
196
196
|
});
|
|
197
197
|
if (!result?.rowCount) {
|
package/middleware/upload.js
CHANGED
|
@@ -8,7 +8,7 @@ const logger_1 = require("@pgpmjs/logger");
|
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
9
|
const multer_1 = __importDefault(require("multer"));
|
|
10
10
|
const os_1 = __importDefault(require("os"));
|
|
11
|
-
const
|
|
11
|
+
const quotes_1 = require("@pgsql/quotes");
|
|
12
12
|
const pg_cache_1 = require("pg-cache");
|
|
13
13
|
const pg_query_context_1 = __importDefault(require("pg-query-context"));
|
|
14
14
|
const graphile_settings_1 = require("graphile-settings");
|
|
@@ -197,7 +197,7 @@ const createUploadAuthenticateMiddleware = (opts) => {
|
|
|
197
197
|
const result = await (0, pg_query_context_1.default)({
|
|
198
198
|
client: pool,
|
|
199
199
|
context,
|
|
200
|
-
query: `SELECT * FROM ${
|
|
200
|
+
query: `SELECT * FROM ${quotes_1.QuoteUtils.quoteQualifiedIdentifier(privateSchema, authFn)}($1)`,
|
|
201
201
|
variables: [authToken],
|
|
202
202
|
});
|
|
203
203
|
if (!result?.rowCount) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive GraphQL Server",
|
|
6
6
|
"main": "index.js",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@pgpmjs/logger": "^2.2.0",
|
|
51
51
|
"@pgpmjs/server-utils": "^3.2.0",
|
|
52
52
|
"@pgpmjs/types": "^2.17.0",
|
|
53
|
+
"@pgsql/quotes": "^17.1.0",
|
|
53
54
|
"cors": "^2.8.5",
|
|
54
55
|
"deepmerge": "^4.3.1",
|
|
55
56
|
"express": "^5.2.1",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"graphile-build-pg": "5.0.0-rc.5",
|
|
61
62
|
"graphile-cache": "^3.1.0",
|
|
62
63
|
"graphile-config": "1.0.0-rc.5",
|
|
63
|
-
"graphile-settings": "^4.6.
|
|
64
|
+
"graphile-settings": "^4.6.2",
|
|
64
65
|
"graphile-utils": "5.0.0-rc.5",
|
|
65
66
|
"graphql": "^16.9.0",
|
|
66
67
|
"graphql-upload": "^13.0.0",
|
|
@@ -88,5 +89,5 @@
|
|
|
88
89
|
"nodemon": "^3.1.10",
|
|
89
90
|
"ts-node": "^10.9.2"
|
|
90
91
|
},
|
|
91
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "16e3a687cf1d629d1eff1a9146e71bec14796196"
|
|
92
93
|
}
|