@constructive-io/graphql-server 5.18.3 → 5.20.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.
@@ -8,7 +8,9 @@ const log = new Logger('error-handler');
8
8
  const isDevelopment = () => getNodeEnv() === 'development';
9
9
  const wantsJson = (req) => {
10
10
  const accept = req.get('Accept') || '';
11
- return accept.includes('application/json') || accept.includes('application/graphql-response+json');
11
+ return accept.includes('application/json')
12
+ || accept.includes('application/graphql-response+json')
13
+ || Boolean(req.is('json'));
12
14
  };
13
15
  const sanitizeMessage = (error) => {
14
16
  if (isDevelopment())
@@ -14,7 +14,9 @@ const log = new logger_1.Logger('error-handler');
14
14
  const isDevelopment = () => (0, env_1.getNodeEnv)() === 'development';
15
15
  const wantsJson = (req) => {
16
16
  const accept = req.get('Accept') || '';
17
- return accept.includes('application/json') || accept.includes('application/graphql-response+json');
17
+ return accept.includes('application/json')
18
+ || accept.includes('application/graphql-response+json')
19
+ || Boolean(req.is('json'));
18
20
  };
19
21
  const sanitizeMessage = (error) => {
20
22
  if (isDevelopment())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-server",
3
- "version": "5.18.3",
3
+ "version": "5.20.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive GraphQL Server",
6
6
  "main": "index.js",
@@ -48,7 +48,7 @@
48
48
  "@constructive-io/graphql-env": "^3.31.0",
49
49
  "@constructive-io/graphql-types": "^3.30.0",
50
50
  "@constructive-io/llm-env": "^0.14.0",
51
- "@constructive-io/query-builder": "^3.12.0",
51
+ "@constructive-io/query-builder": "^3.13.0",
52
52
  "@constructive-io/s3-utils": "^2.32.0",
53
53
  "@constructive-io/url-domains": "^2.30.0",
54
54
  "@graphile-contrib/pg-many-to-many": "2.0.0-rc.2",
@@ -66,8 +66,8 @@
66
66
  "graphile-build-pg": "5.1.3",
67
67
  "graphile-cache": "^4.12.0",
68
68
  "graphile-config": "1.1.0",
69
- "graphile-function-bindings": "^1.13.0",
70
- "graphile-settings": "^6.18.3",
69
+ "graphile-function-bindings": "^1.14.0",
70
+ "graphile-settings": "^6.20.0",
71
71
  "graphile-utils": "5.0.3",
72
72
  "graphql": "16.13.0",
73
73
  "graphql-upload": "^13.0.0",
@@ -90,11 +90,11 @@
90
90
  "@types/request-ip": "^0.0.41",
91
91
  "@types/supertest": "^7.2.1",
92
92
  "cookie-parser": "^1.4.7",
93
- "graphile-test": "5.13.0",
93
+ "graphile-test": "5.14.0",
94
94
  "makage": "^0.3.0",
95
95
  "nodemon": "^3.1.14",
96
96
  "supertest": "^7.2.2",
97
97
  "ts-node": "^10.9.2"
98
98
  },
99
- "gitHead": "e35db12526094b515596ced2dd27a1ec8edd99d5"
99
+ "gitHead": "df6b6613c844b505813e5d02d3a4afd918b74eab"
100
100
  }