@ocap/gql 1.28.6 → 1.28.8
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 +1 -1
- package/lib/index.js +3 -3
- package/package.json +12 -13
- package/LICENSE +0 -13
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const get = require('lodash/get');
|
|
2
|
-
const { createServer } = require('http');
|
|
2
|
+
const { createServer } = require('node:http');
|
|
3
3
|
const { graphqlHTTP } = require('express-graphql');
|
|
4
4
|
const { buildSchema } = require('graphql');
|
|
5
5
|
const schemaSource = require('@ocap/schema');
|
|
@@ -7,7 +7,7 @@ const schemaSource = require('@ocap/schema');
|
|
|
7
7
|
// const debug = require('debug')(require('../package.json').name);
|
|
8
8
|
const createWebSocketServer = require('./ws');
|
|
9
9
|
|
|
10
|
-
const wrapResolver = async (
|
|
10
|
+
const wrapResolver = async (_name, keys, callback) => {
|
|
11
11
|
const result = await callback();
|
|
12
12
|
|
|
13
13
|
const resultsMap = {};
|
|
@@ -116,7 +116,7 @@ const createHttpHandler = ({ resolver, onError = defaultErrorHandler, graphiql =
|
|
|
116
116
|
graphiql,
|
|
117
117
|
// NOTE: following is required because of following gql query validation issue
|
|
118
118
|
// https://stackoverflow.com/questions/56695262/graphql-error-fieldsconflict-fields-have-different-list-shapes
|
|
119
|
-
customValidateFn: (
|
|
119
|
+
customValidateFn: (_schema, query) => {
|
|
120
120
|
const operations = query.definitions
|
|
121
121
|
.map((x) => {
|
|
122
122
|
const selections = get(x, 'selectionSet.selections') || [];
|
package/package.json
CHANGED
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.28.
|
|
6
|
+
"version": "1.28.8",
|
|
7
7
|
"description": "Resolver middleware for ocap adapters",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
10
10
|
"lib"
|
|
11
11
|
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"lint": "biome check",
|
|
14
|
+
"lint:fix": "biome check --write",
|
|
15
|
+
"test": "bun test",
|
|
16
|
+
"coverage": "npm run test -- --coverage"
|
|
17
|
+
},
|
|
12
18
|
"keywords": [],
|
|
13
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
14
20
|
"contributors": [
|
|
@@ -16,21 +22,14 @@
|
|
|
16
22
|
],
|
|
17
23
|
"license": "MIT",
|
|
18
24
|
"dependencies": {
|
|
25
|
+
"@arcblock/ws": "1.28.8",
|
|
26
|
+
"@ocap/schema": "1.28.8",
|
|
19
27
|
"debug": "^4.3.6",
|
|
20
28
|
"express-graphql": "^0.12.0",
|
|
21
29
|
"graphql": "16.5.0",
|
|
22
|
-
"lodash": "^4.17.21"
|
|
23
|
-
"@arcblock/ws": "1.28.6",
|
|
24
|
-
"@ocap/schema": "1.28.6"
|
|
30
|
+
"lodash": "^4.17.21"
|
|
25
31
|
},
|
|
26
32
|
"devDependencies": {
|
|
27
|
-
"express": "^4.19.2"
|
|
28
|
-
"jest": "^29.7.0"
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"lint": "eslint tests lib",
|
|
32
|
-
"lint:fix": "eslint --fix tests lib",
|
|
33
|
-
"test": "jest --forceExit --detectOpenHandles",
|
|
34
|
-
"coverage": "npm run test -- --coverage"
|
|
33
|
+
"express": "^4.19.2"
|
|
35
34
|
}
|
|
36
|
-
}
|
|
35
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright 2018-2025 ArcBlock
|
|
2
|
-
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
See the License for the specific language governing permissions and
|
|
13
|
-
limitations under the License.
|