@steedos/service-object-graphql 2.4.11 → 2.4.12
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/package.json +5 -5
- package/package.service.js +6 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-object-graphql",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"description": "steedos package",
|
|
16
16
|
"repository": {},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "9e0c93d90964dc1a7aef679c64f977d2352ef013",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@steedos/i18n": "2.4.
|
|
21
|
-
"@steedos/objectql": "2.4.
|
|
22
|
-
"@steedos/service-object-mixin": "2.4.
|
|
20
|
+
"@steedos/i18n": "2.4.12",
|
|
21
|
+
"@steedos/objectql": "2.4.12",
|
|
22
|
+
"@steedos/service-object-mixin": "2.4.12",
|
|
23
23
|
"graphql": "^15.8.0",
|
|
24
24
|
"graphql-parse-resolve-info": "^4.12.3",
|
|
25
25
|
"moleculer": "^0.14.25",
|
package/package.service.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2023-03-23 15:12:14
|
|
4
4
|
* @LastEditors: sunhaolin@hotoa.com
|
|
5
|
-
* @LastEditTime: 2023-04-
|
|
5
|
+
* @LastEditTime: 2023-04-11 11:44:41
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ module.exports = {
|
|
|
26
26
|
namespace: "steedos",
|
|
27
27
|
mixins: [serviceObjectMixin],
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
globalGraphQLSettings: {}, // service-api 里generateGraphQLSchema使用
|
|
30
30
|
|
|
31
31
|
projectStarted: false,
|
|
32
32
|
|
|
@@ -34,17 +34,6 @@ module.exports = {
|
|
|
34
34
|
* Settings
|
|
35
35
|
*/
|
|
36
36
|
settings: {
|
|
37
|
-
graphql: {
|
|
38
|
-
// query: ['spaces(fields: JSON, filters: JSON, top: Int, skip: Int, sort: String): [spaces]'],
|
|
39
|
-
// mutation: mutation,
|
|
40
|
-
// resolvers: {
|
|
41
|
-
// Query: {
|
|
42
|
-
// spaces: {
|
|
43
|
-
// action: "find"
|
|
44
|
-
// }
|
|
45
|
-
// }
|
|
46
|
-
// }
|
|
47
|
-
}
|
|
48
37
|
},
|
|
49
38
|
|
|
50
39
|
/**
|
|
@@ -273,7 +262,7 @@ module.exports = {
|
|
|
273
262
|
|
|
274
263
|
const objGraphqlMap = await this.generateObjGraphqlMap(this.name)
|
|
275
264
|
|
|
276
|
-
let
|
|
265
|
+
let type = []
|
|
277
266
|
let query = []
|
|
278
267
|
let mutation = []
|
|
279
268
|
let resolvers = {}
|
|
@@ -283,7 +272,7 @@ module.exports = {
|
|
|
283
272
|
for (const objectName in objGraphqlMap) {
|
|
284
273
|
if (Object.hasOwnProperty.call(objGraphqlMap, objectName)) {
|
|
285
274
|
const gMap = objGraphqlMap[objectName];
|
|
286
|
-
|
|
275
|
+
type.push(gMap.type)
|
|
287
276
|
query = query.concat(gMap.query)
|
|
288
277
|
mutation = mutation.concat(gMap.mutation)
|
|
289
278
|
resolvers = Object.assign(resolvers, gMap.resolvers)
|
|
@@ -292,9 +281,8 @@ module.exports = {
|
|
|
292
281
|
}
|
|
293
282
|
}
|
|
294
283
|
|
|
295
|
-
this.
|
|
296
|
-
|
|
297
|
-
this.settings.graphql = {
|
|
284
|
+
this.globalGraphQLSettings = {
|
|
285
|
+
type: type,
|
|
298
286
|
query: query,
|
|
299
287
|
mutation: mutation,
|
|
300
288
|
resolvers: {
|