Comparing version 0.1.10 to 0.1.11
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.11](https://github.com/forsigner/gqlgen/compare/v0.1.10...v0.1.11) (2020-05-13) | ||
### Features | ||
* 支持精准exclude ([67e414a](https://github.com/forsigner/gqlgen/commit/67e414a6d4e60c307f5baf44060dc43a9f5c0566)) | ||
### [0.1.10](https://github.com/forsigner/gqlgen/compare/v0.1.9...v0.1.10) (2020-05-13) | ||
@@ -7,0 +14,0 @@ |
@@ -71,2 +71,3 @@ "use strict"; | ||
excludes: item.excludes || [], | ||
trace: '', | ||
}); | ||
@@ -85,2 +86,11 @@ const varsToTypesStr = getVarsToTypesStr(queryResult.argumentsDict); | ||
const { curName, curParentType, curParentName, argumentsDict = {}, duplicateArgCounts = {}, crossReferenceKeyList = [], curDepth = 1, depthLimit = 2, excludes = [], } = params; | ||
let trace = params.trace; | ||
if (excludes.includes(trace)) | ||
return { queryStr: '', argumentsDict: [] }; | ||
if (!trace) { | ||
trace += `${curName}`; | ||
} | ||
else { | ||
trace += `.${curName}`; | ||
} | ||
const queryType = gqlSchema.getType(curParentType); | ||
@@ -117,2 +127,3 @@ const field = queryType.getFields()[curName]; | ||
excludes, | ||
trace, | ||
}).queryStr) | ||
@@ -154,2 +165,3 @@ .filter((cur) => cur) | ||
excludes, | ||
trace, | ||
}).queryStr) | ||
@@ -156,0 +168,0 @@ .filter((cur) => cur) |
@@ -32,2 +32,3 @@ export interface ServiceOptions { | ||
excludes?: string[]; | ||
trace: string; | ||
} |
{ | ||
"name": "gqlgen", | ||
"description": "gqlgen", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"author": "forsigner", | ||
@@ -6,0 +6,0 @@ "bin": { |
52291
1205