@lenne.tech/ng-base 0.2.0 → 0.2.1

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.
@@ -2160,19 +2160,29 @@
2160
2160
  /**
2161
2161
  * Get fields / args from IGraphQLTypeCollection
2162
2162
  */
2163
- GraphQLService.prototype.graphQLTypeCollectionToStringArray = function (collection, current, result) {
2163
+ GraphQLService.prototype.graphQLTypeCollectionToStringArray = function (collection, current, result, cacheNode) {
2164
2164
  var e_1, _b;
2165
2165
  if (current === void 0) { current = ''; }
2166
2166
  if (result === void 0) { result = []; }
2167
+ if (cacheNode === void 0) { cacheNode = []; }
2167
2168
  if (collection) {
2168
2169
  if (collection instanceof GraphQLType) {
2169
2170
  result.push(current);
2170
2171
  }
2171
2172
  else {
2173
+ if (current === null || current === void 0 ? void 0 : current.includes('.')) {
2174
+ cacheNode.push(current.split('.')[1]);
2175
+ }
2176
+ else if (current) {
2177
+ cacheNode.push(current);
2178
+ }
2172
2179
  try {
2173
2180
  for (var _c = __values(Object.keys(collection)), _d = _c.next(); !_d.done; _d = _c.next()) {
2174
2181
  var key = _d.value;
2175
- this.graphQLTypeCollectionToStringArray(collection[key], current ? current + '.' + key : key, result);
2182
+ if (current === key || cacheNode.includes(key)) {
2183
+ continue;
2184
+ }
2185
+ this.graphQLTypeCollectionToStringArray(collection[key], current ? current + '.' + key : key, result, cacheNode);
2176
2186
  }
2177
2187
  }
2178
2188
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -2245,6 +2255,10 @@
2245
2255
  }
2246
2256
  // Process object
2247
2257
  else if (typeof args === 'object') {
2258
+ // Check object is empty
2259
+ if (args && Object.keys(args).length === 0 && Object.getPrototypeOf(args) === Object.prototype) {
2260
+ return { argsString: '{}', schemaArgs: schemaArgs, usedArgs: usedArgs };
2261
+ }
2248
2262
  var _loop_1 = function (key, value) {
2249
2263
  // Init data for current entry
2250
2264
  var currentKey = parent + key;