@snowtop/ent 0.1.0-alpha100 → 0.1.0-alpha101

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowtop/ent",
3
- "version": "0.1.0-alpha100",
3
+ "version": "0.1.0-alpha101",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -121,6 +121,11 @@ function processTopLevel(l, l2, gqlCapture) {
121
121
  });
122
122
  }
123
123
  }
124
+ function processCustomTypes(m, gqlCapture) {
125
+ for (const k in m) {
126
+ (0, graphql_1.addCustomType)(m[k], gqlCapture);
127
+ }
128
+ }
124
129
  function processCustomFields(fields, gqlCapture, nodeName) {
125
130
  const m = gqlCapture.getCustomFields();
126
131
  let results = [];
@@ -166,6 +171,9 @@ async function captureDynamic(filePath, gqlCapture) {
166
171
  case "mutations":
167
172
  processTopLevel(v, gqlCapture.getCustomMutations(), gqlCapture);
168
173
  break;
174
+ case "customTypes":
175
+ processCustomTypes(v, gqlCapture);
176
+ break;
169
177
  default:
170
178
  reject(new Error(`key ${k} is unsupported in dynamic custom graphql. only queries and mutations are supported`));
171
179
  }
@@ -197,9 +205,7 @@ async function captureCustom(filePath, filesCsv, jsonPath, gqlCapture) {
197
205
  processTopLevel(json.mutations, gqlCapture.getCustomMutations(), gqlCapture);
198
206
  }
199
207
  if (json.customTypes) {
200
- for (const k in json.customTypes) {
201
- (0, graphql_1.addCustomType)(json.customTypes[k], gqlCapture);
202
- }
208
+ processCustomTypes(json.customTypes, gqlCapture);
203
209
  }
204
210
  return;
205
211
  }