@steedos/service-api 2.5.0-beta.3 → 2.5.0-beta.30
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/index.js +19 -1
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -690,8 +690,26 @@ module.exports = {
|
|
|
690
690
|
typeDefs.push(str);
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
|
|
693
|
+
try {
|
|
694
|
+
return this.makeExecutableSchema({ typeDefs, resolvers, schemaDirectives });
|
|
695
|
+
} catch (error) {
|
|
696
|
+
this.logger.error(error);
|
|
697
|
+
return this.graphqlSchema
|
|
698
|
+
}
|
|
694
699
|
} catch (err) {
|
|
700
|
+
// 用于调试异常GraphQL schema
|
|
701
|
+
// const fs = require('fs');
|
|
702
|
+
// // 写入的文件路径
|
|
703
|
+
// const filePath = `UNABLE_COMPILE_GRAPHQL_SCHEMA.${new Date().getTime()}.txt`;
|
|
704
|
+
// // 使用fs.writeFile方法写入文件
|
|
705
|
+
// fs.writeFile(filePath, str, (err) => {
|
|
706
|
+
// if (err) {
|
|
707
|
+
// console.error(err);
|
|
708
|
+
// return;
|
|
709
|
+
// }
|
|
710
|
+
// console.log('文件已写入');
|
|
711
|
+
// });
|
|
712
|
+
|
|
695
713
|
throw new MoleculerServerError(
|
|
696
714
|
"Unable to compile GraphQL schema",
|
|
697
715
|
500,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-api",
|
|
3
|
-
"version": "2.5.0-beta.
|
|
3
|
+
"version": "2.5.0-beta.30",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@steedos/auth": "2.5.0-beta.
|
|
8
|
-
"@steedos/router": "2.5.0-beta.
|
|
9
|
-
"@steedos/service-object-graphql": "2.5.0-beta.
|
|
10
|
-
"@steedos/service-ui": "2.5.0-beta.
|
|
7
|
+
"@steedos/auth": "2.5.0-beta.30",
|
|
8
|
+
"@steedos/router": "2.5.0-beta.30",
|
|
9
|
+
"@steedos/service-object-graphql": "2.5.0-beta.30",
|
|
10
|
+
"@steedos/service-ui": "2.5.0-beta.30",
|
|
11
11
|
"graphql": "^15.8.0",
|
|
12
12
|
"graphql-iso-date": "^3.6.1",
|
|
13
13
|
"graphql-type-json": "^0.3.2",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "d33d736a3009ecfe57981d03d7062e52eaf27609"
|
|
23
23
|
}
|