microfiber
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -678,3 +678,5 @@ "use strict"; | ||
const typesEncountered = new Set(); | ||
const types = []; // The Query, Mutation and Subscription Types should never be removed due to not being referenced | ||
const types = []; | ||
const interfacesEncounteredKeys = new Set(); | ||
const interfacesByKey = {}; // The Query, Mutation and Subscription Types should never be removed due to not being referenced | ||
// by anything | ||
@@ -732,2 +734,6 @@ | ||
if (type.kind === _etc.KINDS.INTERFACE) { | ||
interfacesByKey[buildKey(type)] = type; | ||
} | ||
if (type.fields) { | ||
@@ -745,2 +751,6 @@ const fields = []; | ||
continue; | ||
} | ||
if (fieldType.kind === _etc.KINDS.INTERFACE) { | ||
interfacesEncounteredKeys.add(buildKey(fieldType)); | ||
} // Keep track of this so we know what we can remove | ||
@@ -846,2 +856,15 @@ | ||
} | ||
} | ||
for (const interfaceEncounteredKey of interfacesEncounteredKeys.values()) { | ||
const interfayce = interfacesByKey[interfaceEncounteredKey]; | ||
for (const possibleType of (interfayce === null || interfayce === void 0 ? void 0 : interfayce.possibleTypes) || []) { | ||
if (!this._hasType(possibleType)) { | ||
continue; | ||
} // Keep track of this so we know what we can remove | ||
typesEncountered.add(buildKey(possibleType)); | ||
} | ||
} // Only include Types that we encountered - if the options say to do so | ||
@@ -848,0 +871,0 @@ |
{ | ||
"name": "microfiber", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A library to query and manipulate GraphQL Introspection Query results in some useful ways.", | ||
@@ -44,3 +44,5 @@ "author": "Chris Newhouse", | ||
"test:watch": "nodemon -x 'yarn test' --ignore dist/", | ||
"test": "yarn prepare && yarn mocha --config ./test/mocha-config.js" | ||
"test:debug:watch": "nodemon -x 'yarn test:debug' --ignore dist/", | ||
"test": "yarn prepare && yarn mocha --config ./test/mocha-config.js", | ||
"test:debug": "yarn test --node-option inspect=0.0.0.0:9223" | ||
}, | ||
@@ -47,0 +49,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47981
1049