@snowtop/ent 0.1.0-alpha100 → 0.1.0-alpha102
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/graphql/graphql.d.ts +1 -0
- package/package.json +1 -1
- package/scripts/custom_graphql.js +10 -3
package/graphql/graphql.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -112,6 +112,7 @@ function processTopLevel(l, l2, gqlCapture) {
|
|
|
112
112
|
nodeName: custom.class,
|
|
113
113
|
functionName: custom.functionName || custom.name,
|
|
114
114
|
gqlName: custom.graphQLName || custom.name,
|
|
115
|
+
edgeName: custom.edgeName,
|
|
115
116
|
fieldType: custom.fieldType,
|
|
116
117
|
args: transformArgs(custom, gqlCapture),
|
|
117
118
|
results: transformResultType(custom),
|
|
@@ -121,6 +122,11 @@ function processTopLevel(l, l2, gqlCapture) {
|
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
}
|
|
125
|
+
function processCustomTypes(m, gqlCapture) {
|
|
126
|
+
for (const k in m) {
|
|
127
|
+
(0, graphql_1.addCustomType)(m[k], gqlCapture);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
124
130
|
function processCustomFields(fields, gqlCapture, nodeName) {
|
|
125
131
|
const m = gqlCapture.getCustomFields();
|
|
126
132
|
let results = [];
|
|
@@ -166,6 +172,9 @@ async function captureDynamic(filePath, gqlCapture) {
|
|
|
166
172
|
case "mutations":
|
|
167
173
|
processTopLevel(v, gqlCapture.getCustomMutations(), gqlCapture);
|
|
168
174
|
break;
|
|
175
|
+
case "customTypes":
|
|
176
|
+
processCustomTypes(v, gqlCapture);
|
|
177
|
+
break;
|
|
169
178
|
default:
|
|
170
179
|
reject(new Error(`key ${k} is unsupported in dynamic custom graphql. only queries and mutations are supported`));
|
|
171
180
|
}
|
|
@@ -197,9 +206,7 @@ async function captureCustom(filePath, filesCsv, jsonPath, gqlCapture) {
|
|
|
197
206
|
processTopLevel(json.mutations, gqlCapture.getCustomMutations(), gqlCapture);
|
|
198
207
|
}
|
|
199
208
|
if (json.customTypes) {
|
|
200
|
-
|
|
201
|
-
(0, graphql_1.addCustomType)(json.customTypes[k], gqlCapture);
|
|
202
|
-
}
|
|
209
|
+
processCustomTypes(json.customTypes, gqlCapture);
|
|
203
210
|
}
|
|
204
211
|
return;
|
|
205
212
|
}
|