@graphitation/supermassive 0.6.3 → 0.7.0
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/.eslintcache +1 -1
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/collectFields.d.ts.map +1 -1
- package/lib/collectFields.js +33 -5
- package/lib/collectFields.mjs +33 -5
- package/lib/definition.d.ts +3 -0
- package/lib/definition.d.ts.map +1 -1
- package/lib/definition.js +9 -1
- package/lib/definition.mjs +9 -1
- package/lib/executeWithSchema.d.ts.map +1 -1
- package/lib/executeWithSchema.js +2 -15
- package/lib/executeWithSchema.mjs +2 -18
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +2 -1
- package/lib/executeWithoutSchema.mjs +2 -1
- package/lib/extractImplicitTypesRuntime.d.ts.map +1 -1
- package/lib/extractImplicitTypesRuntime.js +24 -3
- package/lib/extractImplicitTypesRuntime.mjs +24 -3
- package/lib/extractImplicitTypesToTypescript.d.ts.map +1 -1
- package/lib/extractImplicitTypesToTypescript.js +32 -3
- package/lib/extractImplicitTypesToTypescript.mjs +32 -3
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/utilities/mergeResolvers.d.ts +3 -0
- package/lib/utilities/mergeResolvers.d.ts.map +1 -0
- package/lib/utilities/mergeResolvers.js +36 -0
- package/lib/utilities/mergeResolvers.mjs +32 -0
- package/package.json +1 -1
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/execute.test.ts":"1","/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/extractImplicitTypes.test.ts":"2","/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/subscribe.test.ts":"3","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/TypedAST.ts":"4","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/__tests__/addTypesToRequestDocument.test.ts":"5","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/addTypesToRequestDocument.ts":"6","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/index.ts":"7","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/nice-benchmark.ts":"8","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/index.ts":"9","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/models.ts":"10","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/resolvers.ts":"11","/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/__tests__/typeDefsToImplicitResolvers.test.ts":"12","/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/supermassive.ts":"13","/home/runner/work/graphitation/graphitation/packages/supermassive/src/collectFields.ts":"14","/home/runner/work/graphitation/graphitation/packages/supermassive/src/compiledQuery.ts":"15","/home/runner/work/graphitation/graphitation/packages/supermassive/src/definition.ts":"16","/home/runner/work/graphitation/graphitation/packages/supermassive/src/directives.ts":"17","/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithSchema.ts":"18","/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithoutSchema.ts":"19","/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesRuntime.ts":"20","/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesToTypescript.ts":"21","/home/runner/work/graphitation/graphitation/packages/supermassive/src/index.ts":"22","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Maybe.ts":"23","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/ObjMap.ts":"24","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Path.ts":"25","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/PromiseOrValue.ts":"26","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/devAssert.ts":"27","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/didYouMean.ts":"28","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/identityFunc.ts":"29","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/inspect.ts":"30","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/instanceOf.ts":"31","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/invariant.ts":"32","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isAsyncIterable.ts":"33","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isIterableObject.ts":"34","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isObjectLike.ts":"35","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isPromise.ts":"36","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyMap.ts":"37","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyValMap.ts":"38","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/mapValue.ts":"39","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/memoize3.ts":"40","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/naturalCompare.ts":"41","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/printPathArray.ts":"42","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseForObject.ts":"43","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseReduce.ts":"44","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/suggestionList.ts":"45","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/toObjMap.ts":"46","/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithSchema.ts":"47","/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithoutSchema.ts":"48","/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/annotateDocumentGraphQLTransform.ts":"49","/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/transformerTestUtils.ts":"50","/home/runner/work/graphitation/graphitation/packages/supermassive/src/types.ts":"51","/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mapAsyncIterator.ts":"52","/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/typeNameFromAST.ts":"53","/home/runner/work/graphitation/graphitation/packages/supermassive/src/values.ts":"54"},{"size":5255,"mtime":1643188140386,"results":"55","hashOfConfig":"56"},{"size":3110,"mtime":1643188140386,"results":"57","hashOfConfig":"56"},{"size":7543,"mtime":1643188140386,"results":"58","hashOfConfig":"56"},{"size":14345,"mtime":1643188140386,"results":"59","hashOfConfig":"56"},{"size":5297,"mtime":1643188140386,"results":"60","hashOfConfig":"56"},{"size":2189,"mtime":1643188140386,"results":"61","hashOfConfig":"56"},{"size":3146,"mtime":1643188140386,"results":"62","hashOfConfig":"56"},{"size":712,"mtime":1643188140386,"results":"63","hashOfConfig":"56"},{"size":382,"mtime":1643188140386,"results":"64","hashOfConfig":"56"},{"size":128,"mtime":1643188140386,"results":"65","hashOfConfig":"56"},{"size":10233,"mtime":1643188140386,"results":"66","hashOfConfig":"56"},{"size":848,"mtime":1643188140386,"results":"67","hashOfConfig":"56"},{"size":1654,"mtime":1643188140386,"results":"68","hashOfConfig":"56"},{"size":4179,"mtime":1643188140386,"results":"69","hashOfConfig":"56"},{"size":3431,"mtime":1643188140386,"results":"70","hashOfConfig":"56"},{"size":1215,"mtime":1643188140386,"results":"71","hashOfConfig":"56"},{"size":6589,"mtime":1643188140386,"results":"72","hashOfConfig":"56"},{"size":1313,"mtime":1643188140386,"results":"73","hashOfConfig":"56"},{"size":27208,"mtime":1643188140386,"results":"74","hashOfConfig":"56"},{"size":4017,"mtime":1643188140386,"results":"75","hashOfConfig":"56"},{"size":10446,"mtime":1643188140386,"results":"76","hashOfConfig":"56"},{"size":1595,"mtime":1643188140386,"results":"77","hashOfConfig":"56"},{"size":134,"mtime":1643188140386,"results":"78","hashOfConfig":"56"},{"size":277,"mtime":1643188140386,"results":"79","hashOfConfig":"56"},{"size":711,"mtime":1643188140386,"results":"80","hashOfConfig":"56"},{"size":48,"mtime":1643188140386,"results":"81","hashOfConfig":"56"},{"size":269,"mtime":1643188140386,"results":"82","hashOfConfig":"56"},{"size":1038,"mtime":1643188140386,"results":"83","hashOfConfig":"56"},{"size":108,"mtime":1643188140386,"results":"84","hashOfConfig":"56"},{"size":2797,"mtime":1643188140386,"results":"85","hashOfConfig":"56"},{"size":2294,"mtime":1643188140386,"results":"86","hashOfConfig":"56"},{"size":357,"mtime":1643188140386,"results":"87","hashOfConfig":"56"},{"size":325,"mtime":1643188140386,"results":"88","hashOfConfig":"56"},{"size":778,"mtime":1643188140386,"results":"89","hashOfConfig":"56"},{"size":278,"mtime":1643188140386,"results":"90","hashOfConfig":"56"},{"size":227,"mtime":1643188140386,"results":"91","hashOfConfig":"56"},{"size":921,"mtime":1643188140386,"results":"92","hashOfConfig":"56"},{"size":764,"mtime":1643188140386,"results":"93","hashOfConfig":"56"},{"size":441,"mtime":1643188140386,"results":"94","hashOfConfig":"56"},{"size":821,"mtime":1643188140386,"results":"95","hashOfConfig":"56"},{"size":1314,"mtime":1643188140386,"results":"96","hashOfConfig":"56"},{"size":253,"mtime":1643188140386,"results":"97","hashOfConfig":"56"},{"size":650,"mtime":1643188140386,"results":"98","hashOfConfig":"56"},{"size":803,"mtime":1643188140386,"results":"99","hashOfConfig":"56"},{"size":3938,"mtime":1643188140386,"results":"100","hashOfConfig":"56"},{"size":503,"mtime":1643188140386,"results":"101","hashOfConfig":"56"},{"size":1364,"mtime":1643188140386,"results":"102","hashOfConfig":"56"},{"size":8936,"mtime":1643188140386,"results":"103","hashOfConfig":"56"},{"size":495,"mtime":1643188140386,"results":"104","hashOfConfig":"56"},{"size":6652,"mtime":1643188140386,"results":"105","hashOfConfig":"56"},{"size":3826,"mtime":1643188140386,"results":"106","hashOfConfig":"56"},{"size":1815,"mtime":1643188140386,"results":"107","hashOfConfig":"56"},{"size":308,"mtime":1643188140386,"results":"108","hashOfConfig":"56"},{"size":9318,"mtime":1643188140386,"results":"109","hashOfConfig":"56"},{"filePath":"110","messages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"f884pq",{"filePath":"112","messages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"152","messages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"212","messages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/execute.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/extractImplicitTypes.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/subscribe.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/TypedAST.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/__tests__/addTypesToRequestDocument.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/addTypesToRequestDocument.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/nice-benchmark.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/models.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/resolvers.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/__tests__/typeDefsToImplicitResolvers.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/supermassive.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/collectFields.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/compiledQuery.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/definition.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/directives.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithoutSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesRuntime.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesToTypescript.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Maybe.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/ObjMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Path.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/PromiseOrValue.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/devAssert.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/didYouMean.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/identityFunc.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/inspect.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/instanceOf.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/invariant.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isAsyncIterable.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isIterableObject.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isObjectLike.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isPromise.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyValMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/mapValue.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/memoize3.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/naturalCompare.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/printPathArray.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseForObject.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseReduce.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/suggestionList.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/toObjMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithoutSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/annotateDocumentGraphQLTransform.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/transformerTestUtils.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/types.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mapAsyncIterator.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/typeNameFromAST.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/values.ts",[]]
|
|
1
|
+
[{"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/execute.test.ts":"1","/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/extractImplicitTypes.test.ts":"2","/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/subscribe.test.ts":"3","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/TypedAST.ts":"4","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/__tests__/addTypesToRequestDocument.test.ts":"5","/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/addTypesToRequestDocument.ts":"6","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/index.ts":"7","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/nice-benchmark.ts":"8","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/index.ts":"9","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/models.ts":"10","/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/resolvers.ts":"11","/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/__tests__/typeDefsToImplicitResolvers.test.ts":"12","/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/supermassive.ts":"13","/home/runner/work/graphitation/graphitation/packages/supermassive/src/collectFields.ts":"14","/home/runner/work/graphitation/graphitation/packages/supermassive/src/compiledQuery.ts":"15","/home/runner/work/graphitation/graphitation/packages/supermassive/src/definition.ts":"16","/home/runner/work/graphitation/graphitation/packages/supermassive/src/directives.ts":"17","/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithSchema.ts":"18","/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithoutSchema.ts":"19","/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesRuntime.ts":"20","/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesToTypescript.ts":"21","/home/runner/work/graphitation/graphitation/packages/supermassive/src/index.ts":"22","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Maybe.ts":"23","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/ObjMap.ts":"24","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Path.ts":"25","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/PromiseOrValue.ts":"26","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/devAssert.ts":"27","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/didYouMean.ts":"28","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/identityFunc.ts":"29","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/inspect.ts":"30","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/instanceOf.ts":"31","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/invariant.ts":"32","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isAsyncIterable.ts":"33","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isIterableObject.ts":"34","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isObjectLike.ts":"35","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isPromise.ts":"36","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyMap.ts":"37","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyValMap.ts":"38","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/mapValue.ts":"39","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/memoize3.ts":"40","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/naturalCompare.ts":"41","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/printPathArray.ts":"42","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseForObject.ts":"43","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseReduce.ts":"44","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/suggestionList.ts":"45","/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/toObjMap.ts":"46","/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithSchema.ts":"47","/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithoutSchema.ts":"48","/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/annotateDocumentGraphQLTransform.ts":"49","/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/transformerTestUtils.ts":"50","/home/runner/work/graphitation/graphitation/packages/supermassive/src/types.ts":"51","/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mapAsyncIterator.ts":"52","/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mergeResolvers.ts":"53","/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/typeNameFromAST.ts":"54","/home/runner/work/graphitation/graphitation/packages/supermassive/src/values.ts":"55"},{"size":6313,"mtime":1643880495541,"results":"56","hashOfConfig":"57"},{"size":3872,"mtime":1643880495541,"results":"58","hashOfConfig":"57"},{"size":7504,"mtime":1643880495541,"results":"59","hashOfConfig":"57"},{"size":14345,"mtime":1643880495541,"results":"60","hashOfConfig":"57"},{"size":5297,"mtime":1643880495541,"results":"61","hashOfConfig":"57"},{"size":2189,"mtime":1643880495541,"results":"62","hashOfConfig":"57"},{"size":3146,"mtime":1643880495541,"results":"63","hashOfConfig":"57"},{"size":712,"mtime":1643880495541,"results":"64","hashOfConfig":"57"},{"size":382,"mtime":1643880495541,"results":"65","hashOfConfig":"57"},{"size":128,"mtime":1643880495541,"results":"66","hashOfConfig":"57"},{"size":10233,"mtime":1643880495541,"results":"67","hashOfConfig":"57"},{"size":848,"mtime":1643880495541,"results":"68","hashOfConfig":"57"},{"size":1654,"mtime":1643880495541,"results":"69","hashOfConfig":"57"},{"size":5387,"mtime":1643880495541,"results":"70","hashOfConfig":"57"},{"size":3431,"mtime":1643880495541,"results":"71","hashOfConfig":"57"},{"size":1649,"mtime":1643880495541,"results":"72","hashOfConfig":"57"},{"size":6589,"mtime":1643880495541,"results":"73","hashOfConfig":"57"},{"size":1372,"mtime":1643880495541,"results":"74","hashOfConfig":"57"},{"size":27326,"mtime":1643880495541,"results":"75","hashOfConfig":"57"},{"size":4918,"mtime":1643880495541,"results":"76","hashOfConfig":"57"},{"size":11995,"mtime":1643880495541,"results":"77","hashOfConfig":"57"},{"size":1595,"mtime":1643880495541,"results":"78","hashOfConfig":"57"},{"size":134,"mtime":1643880495541,"results":"79","hashOfConfig":"57"},{"size":277,"mtime":1643880495541,"results":"80","hashOfConfig":"57"},{"size":711,"mtime":1643880495541,"results":"81","hashOfConfig":"57"},{"size":48,"mtime":1643880495541,"results":"82","hashOfConfig":"57"},{"size":269,"mtime":1643880495541,"results":"83","hashOfConfig":"57"},{"size":1038,"mtime":1643880495541,"results":"84","hashOfConfig":"57"},{"size":108,"mtime":1643880495541,"results":"85","hashOfConfig":"57"},{"size":2797,"mtime":1643880495541,"results":"86","hashOfConfig":"57"},{"size":2294,"mtime":1643880495541,"results":"87","hashOfConfig":"57"},{"size":357,"mtime":1643880495541,"results":"88","hashOfConfig":"57"},{"size":325,"mtime":1643880495541,"results":"89","hashOfConfig":"57"},{"size":778,"mtime":1643880495541,"results":"90","hashOfConfig":"57"},{"size":278,"mtime":1643880495541,"results":"91","hashOfConfig":"57"},{"size":227,"mtime":1643880495541,"results":"92","hashOfConfig":"57"},{"size":921,"mtime":1643880495541,"results":"93","hashOfConfig":"57"},{"size":764,"mtime":1643880495541,"results":"94","hashOfConfig":"57"},{"size":441,"mtime":1643880495541,"results":"95","hashOfConfig":"57"},{"size":821,"mtime":1643880495541,"results":"96","hashOfConfig":"57"},{"size":1314,"mtime":1643880495541,"results":"97","hashOfConfig":"57"},{"size":253,"mtime":1643880495541,"results":"98","hashOfConfig":"57"},{"size":650,"mtime":1643880495541,"results":"99","hashOfConfig":"57"},{"size":803,"mtime":1643880495541,"results":"100","hashOfConfig":"57"},{"size":3938,"mtime":1643880495541,"results":"101","hashOfConfig":"57"},{"size":503,"mtime":1643880495541,"results":"102","hashOfConfig":"57"},{"size":1364,"mtime":1643880495541,"results":"103","hashOfConfig":"57"},{"size":8936,"mtime":1643880495541,"results":"104","hashOfConfig":"57"},{"size":495,"mtime":1643880495541,"results":"105","hashOfConfig":"57"},{"size":6652,"mtime":1643880495541,"results":"106","hashOfConfig":"57"},{"size":3878,"mtime":1643880495541,"results":"107","hashOfConfig":"57"},{"size":1815,"mtime":1643880495541,"results":"108","hashOfConfig":"57"},{"size":766,"mtime":1643880495541,"results":"109","hashOfConfig":"57"},{"size":308,"mtime":1643880495541,"results":"110","hashOfConfig":"57"},{"size":9318,"mtime":1643880495541,"results":"111","hashOfConfig":"57"},{"filePath":"112","messages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"f884pq",{"filePath":"114","messages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"152","messages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"212","messages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"218","messages":"219","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/execute.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/extractImplicitTypes.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/__tests__/subscribe.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/TypedAST.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/__tests__/addTypesToRequestDocument.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/ast/addTypesToRequestDocument.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/nice-benchmark.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/models.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/benchmarks/swapi-schema/resolvers.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/__tests__/typeDefsToImplicitResolvers.test.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/bin/supermassive.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/collectFields.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/compiledQuery.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/definition.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/directives.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/executeWithoutSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesRuntime.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/extractImplicitTypesToTypescript.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/index.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Maybe.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/ObjMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/Path.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/PromiseOrValue.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/devAssert.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/didYouMean.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/identityFunc.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/inspect.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/instanceOf.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/invariant.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isAsyncIterable.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isIterableObject.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isObjectLike.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/isPromise.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/keyValMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/mapValue.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/memoize3.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/naturalCompare.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/printPathArray.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseForObject.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/promiseReduce.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/suggestionList.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/jsutils/toObjMap.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/subscribeWithoutSchema.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/annotateDocumentGraphQLTransform.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/transforms/transformerTestUtils.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/types.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mapAsyncIterator.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/mergeResolvers.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/utilities/typeNameFromAST.ts",[],"/home/runner/work/graphitation/graphitation/packages/supermassive/src/values.ts",[]]
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@graphitation/supermassive",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 03 Feb 2022 09:30:20 GMT",
|
|
6
|
+
"tag": "@graphitation/supermassive_v0.7.0",
|
|
7
|
+
"version": "0.7.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jakubvejr@microsoft.com",
|
|
12
|
+
"package": "@graphitation/supermassive",
|
|
13
|
+
"commit": "8de2f546c23c6d09c6461ca291873ed22660566f",
|
|
14
|
+
"comment": "check whether a fragment is applicable to the given type"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 26 Jan 2022 09:11:30 GMT",
|
|
6
21
|
"tag": "@graphitation/supermassive_v0.6.3",
|
|
7
22
|
"version": "0.6.3",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @graphitation/supermassive
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 03 Feb 2022 09:30:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.7.0
|
|
8
|
+
|
|
9
|
+
Thu, 03 Feb 2022 09:30:20 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- check whether a fragment is applicable to the given type (jakubvejr@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.6.3
|
|
8
16
|
|
|
9
|
-
Wed, 26 Jan 2022 09:11:
|
|
17
|
+
Wed, 26 Jan 2022 09:11:30 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectFields.d.ts","sourceRoot":"","sources":["../src/collectFields.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,sBAAsB,EAGtB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"collectFields.d.ts","sourceRoot":"","sources":["../src/collectFields.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,sBAAsB,EAGtB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM/C,OAAO,EAAE,SAAS,EAA4C,MAAM,SAAS,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,EACzC,cAAc,EAAE;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAC/C,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,EACrC,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,GAChC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAgE/B"}
|
package/lib/collectFields.js
CHANGED
|
@@ -27,6 +27,8 @@ __export(exports, {
|
|
|
27
27
|
var import_graphql = __toModule(require("graphql"));
|
|
28
28
|
var import_values = __toModule(require("./values"));
|
|
29
29
|
var import_directives = __toModule(require("./directives"));
|
|
30
|
+
var import_typeNameFromAST = __toModule(require("./utilities/typeNameFromAST"));
|
|
31
|
+
var import_definition = __toModule(require("./definition"));
|
|
30
32
|
function collectFields(resolvers, fragments, variableValues, runtimeTypeName, selectionSet, fields, visitedFragmentNames) {
|
|
31
33
|
for (const selection of selectionSet.selections) {
|
|
32
34
|
switch (selection.kind) {
|
|
@@ -44,7 +46,7 @@ function collectFields(resolvers, fragments, variableValues, runtimeTypeName, se
|
|
|
44
46
|
break;
|
|
45
47
|
}
|
|
46
48
|
case import_graphql.Kind.INLINE_FRAGMENT: {
|
|
47
|
-
if (!shouldIncludeNode(resolvers, variableValues, selection) || !doesFragmentConditionMatch(selection, runtimeTypeName)) {
|
|
49
|
+
if (!shouldIncludeNode(resolvers, variableValues, selection) || !doesFragmentConditionMatch(selection, runtimeTypeName, resolvers)) {
|
|
48
50
|
continue;
|
|
49
51
|
}
|
|
50
52
|
collectFields(resolvers, fragments, variableValues, runtimeTypeName, selection.selectionSet, fields, visitedFragmentNames);
|
|
@@ -57,7 +59,7 @@ function collectFields(resolvers, fragments, variableValues, runtimeTypeName, se
|
|
|
57
59
|
}
|
|
58
60
|
visitedFragmentNames.add(fragName);
|
|
59
61
|
const fragment = fragments[fragName];
|
|
60
|
-
if (!fragment || !doesFragmentConditionMatch(fragment, runtimeTypeName)) {
|
|
62
|
+
if (!fragment || !doesFragmentConditionMatch(fragment, runtimeTypeName, resolvers)) {
|
|
61
63
|
continue;
|
|
62
64
|
}
|
|
63
65
|
collectFields(resolvers, fragments, variableValues, runtimeTypeName, fragment.selectionSet, fields, visitedFragmentNames);
|
|
@@ -82,15 +84,41 @@ function shouldIncludeNode(resolvers, variableValues, node) {
|
|
|
82
84
|
}
|
|
83
85
|
return true;
|
|
84
86
|
}
|
|
85
|
-
function doesFragmentConditionMatch(fragment, typeName) {
|
|
87
|
+
function doesFragmentConditionMatch(fragment, typeName, resolvers) {
|
|
86
88
|
const typeConditionNode = fragment.typeCondition;
|
|
87
89
|
if (!typeConditionNode) {
|
|
88
90
|
return true;
|
|
89
91
|
}
|
|
90
|
-
|
|
92
|
+
const conditionalType = (0, import_typeNameFromAST.typeNameFromAST)(typeConditionNode);
|
|
93
|
+
if (conditionalType === typeName) {
|
|
91
94
|
return true;
|
|
92
95
|
}
|
|
93
|
-
|
|
96
|
+
const subTypes = getSubTypes(resolvers, new Set(), conditionalType);
|
|
97
|
+
return subTypes.has(typeName);
|
|
98
|
+
}
|
|
99
|
+
function getSubTypes(resolvers, abstractTypes, conditionalType) {
|
|
100
|
+
const resolver = resolvers[conditionalType];
|
|
101
|
+
if ((0, import_definition.isInterfaceResolverType)(resolver)) {
|
|
102
|
+
const result = resolver.__implementedBy.reduce((acc, item) => {
|
|
103
|
+
if (!abstractTypes.has(item)) {
|
|
104
|
+
const newTypes = new Set([...abstractTypes, item]);
|
|
105
|
+
acc.push(...abstractTypes, ...getSubTypes(resolvers, newTypes, item));
|
|
106
|
+
}
|
|
107
|
+
return acc;
|
|
108
|
+
}, []);
|
|
109
|
+
return new Set([...result]);
|
|
110
|
+
}
|
|
111
|
+
if ((0, import_definition.isUnionResolverType)(resolver)) {
|
|
112
|
+
const result = resolver.__types.reduce((acc, item) => {
|
|
113
|
+
if (!abstractTypes.has(item)) {
|
|
114
|
+
const newTypes = new Set([...abstractTypes, item]);
|
|
115
|
+
acc.push(...abstractTypes, ...getSubTypes(resolvers, newTypes, item));
|
|
116
|
+
}
|
|
117
|
+
return acc;
|
|
118
|
+
}, []);
|
|
119
|
+
return new Set([...result]);
|
|
120
|
+
}
|
|
121
|
+
return abstractTypes;
|
|
94
122
|
}
|
|
95
123
|
function getFieldEntryKey(node) {
|
|
96
124
|
return node.alias ? node.alias.value : node.name.value;
|
package/lib/collectFields.mjs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import {Kind} from "graphql";
|
|
3
3
|
import {getDirectiveValues} from "./values.mjs";
|
|
4
4
|
import {GraphQLSkipDirective, GraphQLIncludeDirective} from "./directives.mjs";
|
|
5
|
+
import {typeNameFromAST} from "./utilities/typeNameFromAST.mjs";
|
|
6
|
+
import {isUnionResolverType, isInterfaceResolverType} from "./definition.mjs";
|
|
5
7
|
function collectFields(resolvers, fragments, variableValues, runtimeTypeName, selectionSet, fields, visitedFragmentNames) {
|
|
6
8
|
for (const selection of selectionSet.selections) {
|
|
7
9
|
switch (selection.kind) {
|
|
@@ -19,7 +21,7 @@ function collectFields(resolvers, fragments, variableValues, runtimeTypeName, se
|
|
|
19
21
|
break;
|
|
20
22
|
}
|
|
21
23
|
case Kind.INLINE_FRAGMENT: {
|
|
22
|
-
if (!shouldIncludeNode(resolvers, variableValues, selection) || !doesFragmentConditionMatch(selection, runtimeTypeName)) {
|
|
24
|
+
if (!shouldIncludeNode(resolvers, variableValues, selection) || !doesFragmentConditionMatch(selection, runtimeTypeName, resolvers)) {
|
|
23
25
|
continue;
|
|
24
26
|
}
|
|
25
27
|
collectFields(resolvers, fragments, variableValues, runtimeTypeName, selection.selectionSet, fields, visitedFragmentNames);
|
|
@@ -32,7 +34,7 @@ function collectFields(resolvers, fragments, variableValues, runtimeTypeName, se
|
|
|
32
34
|
}
|
|
33
35
|
visitedFragmentNames.add(fragName);
|
|
34
36
|
const fragment = fragments[fragName];
|
|
35
|
-
if (!fragment || !doesFragmentConditionMatch(fragment, runtimeTypeName)) {
|
|
37
|
+
if (!fragment || !doesFragmentConditionMatch(fragment, runtimeTypeName, resolvers)) {
|
|
36
38
|
continue;
|
|
37
39
|
}
|
|
38
40
|
collectFields(resolvers, fragments, variableValues, runtimeTypeName, fragment.selectionSet, fields, visitedFragmentNames);
|
|
@@ -57,15 +59,41 @@ function shouldIncludeNode(resolvers, variableValues, node) {
|
|
|
57
59
|
}
|
|
58
60
|
return true;
|
|
59
61
|
}
|
|
60
|
-
function doesFragmentConditionMatch(fragment, typeName) {
|
|
62
|
+
function doesFragmentConditionMatch(fragment, typeName, resolvers) {
|
|
61
63
|
const typeConditionNode = fragment.typeCondition;
|
|
62
64
|
if (!typeConditionNode) {
|
|
63
65
|
return true;
|
|
64
66
|
}
|
|
65
|
-
|
|
67
|
+
const conditionalType = typeNameFromAST(typeConditionNode);
|
|
68
|
+
if (conditionalType === typeName) {
|
|
66
69
|
return true;
|
|
67
70
|
}
|
|
68
|
-
|
|
71
|
+
const subTypes = getSubTypes(resolvers, new Set(), conditionalType);
|
|
72
|
+
return subTypes.has(typeName);
|
|
73
|
+
}
|
|
74
|
+
function getSubTypes(resolvers, abstractTypes, conditionalType) {
|
|
75
|
+
const resolver = resolvers[conditionalType];
|
|
76
|
+
if (isInterfaceResolverType(resolver)) {
|
|
77
|
+
const result = resolver.__implementedBy.reduce((acc, item) => {
|
|
78
|
+
if (!abstractTypes.has(item)) {
|
|
79
|
+
const newTypes = new Set([...abstractTypes, item]);
|
|
80
|
+
acc.push(...abstractTypes, ...getSubTypes(resolvers, newTypes, item));
|
|
81
|
+
}
|
|
82
|
+
return acc;
|
|
83
|
+
}, []);
|
|
84
|
+
return new Set([...result]);
|
|
85
|
+
}
|
|
86
|
+
if (isUnionResolverType(resolver)) {
|
|
87
|
+
const result = resolver.__types.reduce((acc, item) => {
|
|
88
|
+
if (!abstractTypes.has(item)) {
|
|
89
|
+
const newTypes = new Set([...abstractTypes, item]);
|
|
90
|
+
acc.push(...abstractTypes, ...getSubTypes(resolvers, newTypes, item));
|
|
91
|
+
}
|
|
92
|
+
return acc;
|
|
93
|
+
}, []);
|
|
94
|
+
return new Set([...result]);
|
|
95
|
+
}
|
|
96
|
+
return abstractTypes;
|
|
69
97
|
}
|
|
70
98
|
function getFieldEntryKey(node) {
|
|
71
99
|
return node.alias ? node.alias.value : node.name.value;
|
package/lib/definition.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { GraphQLFieldConfigArgumentMap, GraphQLArgument } from "graphql";
|
|
2
|
+
import { Resolver, UnionTypeResolver, InterfaceTypeResolver } from "./types";
|
|
2
3
|
export declare function defineArguments(config: GraphQLFieldConfigArgumentMap): ReadonlyArray<GraphQLArgument>;
|
|
3
4
|
export declare function argsToArgsConfig(args: ReadonlyArray<GraphQLArgument>): GraphQLFieldConfigArgumentMap;
|
|
5
|
+
export declare function isInterfaceResolverType(resolver: Resolver<any, any>): resolver is InterfaceTypeResolver;
|
|
6
|
+
export declare function isUnionResolverType(resolver: Resolver<any, any>): resolver is UnionTypeResolver;
|
|
4
7
|
//# sourceMappingURL=definition.d.ts.map
|
package/lib/definition.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,6BAA6B,EAC7B,eAAe,EAChB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,6BAA6B,EAC7B,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAM7E,wBAAgB,eAAe,CAC7B,MAAM,EAAE,6BAA6B,GACpC,aAAa,CAAC,eAAe,CAAC,CAUhC;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,aAAa,CAAC,eAAe,CAAC,GACnC,6BAA6B,CAa/B;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,GAC3B,QAAQ,IAAI,qBAAqB,CAEnC;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,GAC3B,QAAQ,IAAI,iBAAiB,CAE/B"}
|
package/lib/definition.js
CHANGED
|
@@ -23,7 +23,9 @@ var __toModule = (module2) => {
|
|
|
23
23
|
__markAsModule(exports);
|
|
24
24
|
__export(exports, {
|
|
25
25
|
argsToArgsConfig: () => argsToArgsConfig,
|
|
26
|
-
defineArguments: () => defineArguments
|
|
26
|
+
defineArguments: () => defineArguments,
|
|
27
|
+
isInterfaceResolverType: () => isInterfaceResolverType,
|
|
28
|
+
isUnionResolverType: () => isUnionResolverType
|
|
27
29
|
});
|
|
28
30
|
var import_toObjMap = __toModule(require("./jsutils/toObjMap"));
|
|
29
31
|
var import_keyValMap = __toModule(require("./jsutils/keyValMap"));
|
|
@@ -48,3 +50,9 @@ function argsToArgsConfig(args) {
|
|
|
48
50
|
astNode: arg.astNode
|
|
49
51
|
}));
|
|
50
52
|
}
|
|
53
|
+
function isInterfaceResolverType(resolver) {
|
|
54
|
+
return "__implementedBy" in resolver && "__resolveType" in resolver;
|
|
55
|
+
}
|
|
56
|
+
function isUnionResolverType(resolver) {
|
|
57
|
+
return "__types" in resolver && "__resolveType" in resolver;
|
|
58
|
+
}
|
package/lib/definition.mjs
CHANGED
|
@@ -22,7 +22,15 @@ function argsToArgsConfig(args) {
|
|
|
22
22
|
astNode: arg.astNode
|
|
23
23
|
}));
|
|
24
24
|
}
|
|
25
|
+
function isInterfaceResolverType(resolver) {
|
|
26
|
+
return "__implementedBy" in resolver && "__resolveType" in resolver;
|
|
27
|
+
}
|
|
28
|
+
function isUnionResolverType(resolver) {
|
|
29
|
+
return "__types" in resolver && "__resolveType" in resolver;
|
|
30
|
+
}
|
|
25
31
|
export {
|
|
26
32
|
argsToArgsConfig,
|
|
27
|
-
defineArguments
|
|
33
|
+
defineArguments,
|
|
34
|
+
isInterfaceResolverType,
|
|
35
|
+
isUnionResolverType
|
|
28
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeWithSchema.d.ts","sourceRoot":"","sources":["../src/executeWithSchema.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAa,eAAe,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"executeWithSchema.d.ts","sourceRoot":"","sources":["../src/executeWithSchema.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAa,eAAe,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAG9E,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,WAAW,EACrB,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,EAAE,uBAAuB,GAAG,cAAc,CAAC,eAAe,CAAC,CA4B3D"}
|
package/lib/executeWithSchema.js
CHANGED
|
@@ -4,20 +4,6 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
10
|
-
var __objSpread = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
22
8
|
var __export = (target, all) => {
|
|
23
9
|
for (var name in all)
|
|
@@ -40,6 +26,7 @@ __export(exports, {
|
|
|
40
26
|
});
|
|
41
27
|
var import_graphql = __toModule(require("graphql"));
|
|
42
28
|
var import_index = __toModule(require("./index"));
|
|
29
|
+
var import_mergeResolvers = __toModule(require("./utilities/mergeResolvers"));
|
|
43
30
|
function executeWithSchema({
|
|
44
31
|
typeDefs,
|
|
45
32
|
resolvers,
|
|
@@ -62,7 +49,7 @@ function executeWithSchema({
|
|
|
62
49
|
}
|
|
63
50
|
};
|
|
64
51
|
extractedResolvers = (0, import_index.extractImplicitTypes)(typeDefs, getTypeByName);
|
|
65
|
-
const fullResolvers =
|
|
52
|
+
const fullResolvers = (0, import_mergeResolvers.mergeResolvers)(resolvers, extractedResolvers);
|
|
66
53
|
const document = (0, import_index.addTypesToRequestDocument)(schema, rawDocument);
|
|
67
54
|
return (0, import_index.executeWithoutSchema)({
|
|
68
55
|
document,
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
6
|
-
var __objSpread = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
1
|
// src/executeWithSchema.ts
|
|
19
2
|
import {isInputType, buildASTSchema} from "graphql";
|
|
20
3
|
import {
|
|
@@ -23,6 +6,7 @@ import {
|
|
|
23
6
|
extractImplicitTypes,
|
|
24
7
|
specifiedScalars
|
|
25
8
|
} from "./index.mjs";
|
|
9
|
+
import {mergeResolvers} from "./utilities/mergeResolvers.mjs";
|
|
26
10
|
function executeWithSchema({
|
|
27
11
|
typeDefs,
|
|
28
12
|
resolvers,
|
|
@@ -45,7 +29,7 @@ function executeWithSchema({
|
|
|
45
29
|
}
|
|
46
30
|
};
|
|
47
31
|
extractedResolvers = extractImplicitTypes(typeDefs, getTypeByName);
|
|
48
|
-
const fullResolvers =
|
|
32
|
+
const fullResolvers = mergeResolvers(resolvers, extractedResolvers);
|
|
49
33
|
const document = addTypesToRequestDocument(schema, rawDocument);
|
|
50
34
|
return executeWithoutSchema({
|
|
51
35
|
document,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeWithoutSchema.d.ts","sourceRoot":"","sources":["../src/executeWithoutSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EASb,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAQxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"executeWithoutSchema.d.ts","sourceRoot":"","sources":["../src/executeWithoutSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EASb,MAAM,SAAS,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AAA;CAAE,CAAC,GACxD,IAAI,CAQN;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,OAAO,EAClB,YAAY,EAAE,OAAO,EACrB,iBAAiB,EAAE,KAAK,CAAC;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,EACzD,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,EAC5B,aAAa,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,EAC7D,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GACnD,KAAK,CAAC,YAAY,CAAC,GAAG,gBAAgB,CAyDxC;AAoPD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,gBAAgB,EAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,EAC5B,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,QAAQ,EACxB,IAAI,EAAE,IAAI,GACT,WAAW,CAeb;AAoWD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,CAM9D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,qBAAqB,CACtD,OAAO,EACP,OAAO,CAUR,CAAC;AAGF,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,uBAAuB,GAAG,2BAA2B,GAC/D,MAAM,CASR"}
|
|
@@ -41,6 +41,7 @@ var import_isPromise = __toModule(require("./jsutils/isPromise"));
|
|
|
41
41
|
var import_Path = __toModule(require("./jsutils/Path"));
|
|
42
42
|
var import_promiseForObject = __toModule(require("./jsutils/promiseForObject"));
|
|
43
43
|
var import_promiseReduce = __toModule(require("./jsutils/promiseReduce"));
|
|
44
|
+
var import_definition = __toModule(require("./definition"));
|
|
44
45
|
var import_typeNameFromAST = __toModule(require("./utilities/typeNameFromAST"));
|
|
45
46
|
var import_values = __toModule(require("./values"));
|
|
46
47
|
function executeWithoutSchema(args) {
|
|
@@ -270,7 +271,7 @@ function completeValue(exeContext, returnTypeNode, fieldNodes, info, path, resul
|
|
|
270
271
|
}
|
|
271
272
|
if (returnType instanceof import_graphql.GraphQLInputObjectType) {
|
|
272
273
|
}
|
|
273
|
-
if (
|
|
274
|
+
if ((0, import_definition.isUnionResolverType)(returnType) || (0, import_definition.isInterfaceResolverType)(returnType)) {
|
|
274
275
|
return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);
|
|
275
276
|
}
|
|
276
277
|
if (typeof returnType === "object") {
|
|
@@ -18,6 +18,7 @@ import {isPromise} from "./jsutils/isPromise.mjs";
|
|
|
18
18
|
import {addPath, pathToArray} from "./jsutils/Path.mjs";
|
|
19
19
|
import {promiseForObject} from "./jsutils/promiseForObject.mjs";
|
|
20
20
|
import {promiseReduce} from "./jsutils/promiseReduce.mjs";
|
|
21
|
+
import {isUnionResolverType, isInterfaceResolverType} from "./definition.mjs";
|
|
21
22
|
import {typeNameFromAST} from "./utilities/typeNameFromAST.mjs";
|
|
22
23
|
import {
|
|
23
24
|
getArgumentValues,
|
|
@@ -251,7 +252,7 @@ function completeValue(exeContext, returnTypeNode, fieldNodes, info, path, resul
|
|
|
251
252
|
}
|
|
252
253
|
if (returnType instanceof GraphQLInputObjectType) {
|
|
253
254
|
}
|
|
254
|
-
if (
|
|
255
|
+
if (isUnionResolverType(returnType) || isInterfaceResolverType(returnType)) {
|
|
255
256
|
return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);
|
|
256
257
|
}
|
|
257
258
|
if (typeof returnType === "object") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractImplicitTypesRuntime.d.ts","sourceRoot":"","sources":["../src/extractImplicitTypesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"extractImplicitTypesRuntime.d.ts","sourceRoot":"","sources":["../src/extractImplicitTypesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAgBZ,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EAIV,MAAM,SAAS,CAAC;AAEjB,wBAAgB,oBAAoB,CAAC,OAAO,GAAG,GAAG,EAAE,QAAQ,GAAG,GAAG,EAChE,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,gBAAgB,GAChD,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CA6C9B"}
|
|
@@ -26,8 +26,9 @@ __export(exports, {
|
|
|
26
26
|
});
|
|
27
27
|
var import_graphql = __toModule(require("graphql"));
|
|
28
28
|
function extractImplicitTypes(document, getTypeByName) {
|
|
29
|
-
var _a;
|
|
29
|
+
var _a, _b, _c;
|
|
30
30
|
const result = Object.create(null);
|
|
31
|
+
const implementedBy = {};
|
|
31
32
|
for (let astNode of document.definitions) {
|
|
32
33
|
if (astNode.kind === import_graphql.Kind.SCALAR_TYPE_DEFINITION) {
|
|
33
34
|
const name = astNode.name.value;
|
|
@@ -39,9 +40,29 @@ function extractImplicitTypes(document, getTypeByName) {
|
|
|
39
40
|
result[astNode.name.value] = makeInputObject(astNode, getTypeByName);
|
|
40
41
|
} else if (astNode.kind === import_graphql.Kind.ENUM_TYPE_DEFINITION) {
|
|
41
42
|
result[astNode.name.value] = makeEnum(astNode);
|
|
42
|
-
} else if (astNode.kind === import_graphql.Kind.
|
|
43
|
-
|
|
43
|
+
} else if (astNode.kind === import_graphql.Kind.INTERFACE_TYPE_DEFINITION) {
|
|
44
|
+
if (!implementedBy[astNode.name.value]) {
|
|
45
|
+
implementedBy[astNode.name.value] = [];
|
|
46
|
+
}
|
|
47
|
+
result[astNode.name.value] = {
|
|
48
|
+
__resolveType: void 0,
|
|
49
|
+
__implementedBy: implementedBy[astNode.name.value]
|
|
50
|
+
};
|
|
51
|
+
} else if (astNode.kind === import_graphql.Kind.UNION_TYPE_DEFINITION) {
|
|
52
|
+
const types = (_b = astNode.types) == null ? void 0 : _b.map((typeNode) => {
|
|
53
|
+
return typeNode.name.value;
|
|
54
|
+
});
|
|
55
|
+
result[astNode.name.value] = {
|
|
56
|
+
__resolveType: void 0,
|
|
57
|
+
__types: types || []
|
|
58
|
+
};
|
|
44
59
|
} else if (astNode.kind === import_graphql.Kind.OBJECT_TYPE_DEFINITION) {
|
|
60
|
+
(_c = astNode.interfaces) == null ? void 0 : _c.forEach((node) => {
|
|
61
|
+
if (!implementedBy[node.name.value]) {
|
|
62
|
+
implementedBy[node.name.value] = [];
|
|
63
|
+
}
|
|
64
|
+
implementedBy[node.name.value].push(astNode.name.value);
|
|
65
|
+
});
|
|
45
66
|
result[astNode.name.value] = {};
|
|
46
67
|
}
|
|
47
68
|
}
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
GraphQLList
|
|
12
12
|
} from "graphql";
|
|
13
13
|
function extractImplicitTypes(document, getTypeByName) {
|
|
14
|
-
var _a;
|
|
14
|
+
var _a, _b, _c;
|
|
15
15
|
const result = Object.create(null);
|
|
16
|
+
const implementedBy = {};
|
|
16
17
|
for (let astNode of document.definitions) {
|
|
17
18
|
if (astNode.kind === Kind.SCALAR_TYPE_DEFINITION) {
|
|
18
19
|
const name = astNode.name.value;
|
|
@@ -24,9 +25,29 @@ function extractImplicitTypes(document, getTypeByName) {
|
|
|
24
25
|
result[astNode.name.value] = makeInputObject(astNode, getTypeByName);
|
|
25
26
|
} else if (astNode.kind === Kind.ENUM_TYPE_DEFINITION) {
|
|
26
27
|
result[astNode.name.value] = makeEnum(astNode);
|
|
27
|
-
} else if (astNode.kind === Kind.
|
|
28
|
-
|
|
28
|
+
} else if (astNode.kind === Kind.INTERFACE_TYPE_DEFINITION) {
|
|
29
|
+
if (!implementedBy[astNode.name.value]) {
|
|
30
|
+
implementedBy[astNode.name.value] = [];
|
|
31
|
+
}
|
|
32
|
+
result[astNode.name.value] = {
|
|
33
|
+
__resolveType: void 0,
|
|
34
|
+
__implementedBy: implementedBy[astNode.name.value]
|
|
35
|
+
};
|
|
36
|
+
} else if (astNode.kind === Kind.UNION_TYPE_DEFINITION) {
|
|
37
|
+
const types = (_b = astNode.types) == null ? void 0 : _b.map((typeNode) => {
|
|
38
|
+
return typeNode.name.value;
|
|
39
|
+
});
|
|
40
|
+
result[astNode.name.value] = {
|
|
41
|
+
__resolveType: void 0,
|
|
42
|
+
__types: types || []
|
|
43
|
+
};
|
|
29
44
|
} else if (astNode.kind === Kind.OBJECT_TYPE_DEFINITION) {
|
|
45
|
+
(_c = astNode.interfaces) == null ? void 0 : _c.forEach((node) => {
|
|
46
|
+
if (!implementedBy[node.name.value]) {
|
|
47
|
+
implementedBy[node.name.value] = [];
|
|
48
|
+
}
|
|
49
|
+
implementedBy[node.name.value].push(astNode.name.value);
|
|
50
|
+
});
|
|
30
51
|
result[astNode.name.value] = {};
|
|
31
52
|
}
|
|
32
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractImplicitTypesToTypescript.d.ts","sourceRoot":"","sources":["../src/extractImplicitTypesToTypescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"extractImplicitTypesToTypescript.d.ts","sourceRoot":"","sources":["../src/extractImplicitTypesToTypescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,YAAY,EAab,MAAM,SAAS,CAAC;AAUjB,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,YAAY,GACrB,EAAE,CAAC,UAAU,CA4Gf"}
|
|
@@ -34,6 +34,7 @@ const SPECIFIED_SCALARS = {
|
|
|
34
34
|
Boolean: "GraphQLBoolean"
|
|
35
35
|
};
|
|
36
36
|
function extractImplicitTypesToTypescript(document) {
|
|
37
|
+
var _a, _b;
|
|
37
38
|
const definitions = [];
|
|
38
39
|
const imports = [
|
|
39
40
|
"GraphQLList",
|
|
@@ -45,6 +46,8 @@ function extractImplicitTypesToTypescript(document) {
|
|
|
45
46
|
"GraphQLBoolean"
|
|
46
47
|
];
|
|
47
48
|
const identifiers = [];
|
|
49
|
+
const implementedBy = {};
|
|
50
|
+
const interfaceAstNodes = [];
|
|
48
51
|
for (let astNode of document.definitions) {
|
|
49
52
|
if (astNode.kind === import_graphql.Kind.SCALAR_TYPE_DEFINITION) {
|
|
50
53
|
definitions.push(createScalarType(astNode));
|
|
@@ -58,14 +61,32 @@ function extractImplicitTypesToTypescript(document) {
|
|
|
58
61
|
definitions.push(createEnumType(astNode));
|
|
59
62
|
addToSetArray(imports, "GraphQLEnumType");
|
|
60
63
|
addToSetArray(identifiers, astNode.name.value);
|
|
61
|
-
} else if (astNode.kind === import_graphql.Kind.
|
|
62
|
-
|
|
64
|
+
} else if (astNode.kind === import_graphql.Kind.INTERFACE_TYPE_DEFINITION) {
|
|
65
|
+
interfaceAstNodes.push(astNode);
|
|
66
|
+
addToSetArray(identifiers, astNode.name.value);
|
|
67
|
+
} else if (astNode.kind === import_graphql.Kind.UNION_TYPE_DEFINITION) {
|
|
68
|
+
const types = (_a = astNode.types) == null ? void 0 : _a.map((typeNode) => {
|
|
69
|
+
return typeNode.name.value;
|
|
70
|
+
});
|
|
71
|
+
definitions.push(createAbstractType(astNode, void 0, types));
|
|
63
72
|
addToSetArray(identifiers, astNode.name.value);
|
|
64
73
|
} else if (astNode.kind === import_graphql.Kind.OBJECT_TYPE_DEFINITION) {
|
|
74
|
+
(_b = astNode.interfaces) == null ? void 0 : _b.forEach((node) => {
|
|
75
|
+
if (!implementedBy[node.name.value]) {
|
|
76
|
+
implementedBy[node.name.value] = [];
|
|
77
|
+
}
|
|
78
|
+
implementedBy[node.name.value].push(astNode.name.value);
|
|
79
|
+
});
|
|
65
80
|
definitions.push(createObjectType(astNode));
|
|
66
81
|
addToSetArray(identifiers, astNode.name.value);
|
|
67
82
|
}
|
|
68
83
|
}
|
|
84
|
+
interfaceAstNodes.forEach((astNode) => {
|
|
85
|
+
if (!implementedBy[astNode.name.value]) {
|
|
86
|
+
implementedBy[astNode.name.value] = [];
|
|
87
|
+
}
|
|
88
|
+
definitions.push(createAbstractType(astNode, implementedBy[astNode.name.value]));
|
|
89
|
+
});
|
|
69
90
|
const importDefinition = import_typescript.factory.createImportDeclaration(void 0, void 0, import_typescript.factory.createImportClause(false, void 0, import_typescript.factory.createNamedImports(imports.map((imp) => import_typescript.factory.createImportSpecifier(void 0, import_typescript.factory.createIdentifier(imp))))), import_typescript.factory.createStringLiteral("graphql"));
|
|
70
91
|
const exportDefinition = import_typescript.factory.createVariableStatement([import_typescript.factory.createModifier(import_typescript.default.SyntaxKind.ExportKeyword)], import_typescript.factory.createVariableDeclarationList([
|
|
71
92
|
import_typescript.factory.createVariableDeclaration(import_typescript.factory.createIdentifier("resolvers"), void 0, void 0, import_typescript.factory.createObjectLiteralExpression(identifiers.map((def) => import_typescript.factory.createShorthandPropertyAssignment(import_typescript.factory.createIdentifier(def), void 0))))
|
|
@@ -124,8 +145,16 @@ function createEnumType(astNode) {
|
|
|
124
145
|
])
|
|
125
146
|
]));
|
|
126
147
|
}
|
|
127
|
-
function createAbstractType(astNode) {
|
|
148
|
+
function createAbstractType(astNode, implementedBy, types) {
|
|
149
|
+
const properties = [];
|
|
150
|
+
if (implementedBy) {
|
|
151
|
+
properties.push(import_typescript.factory.createPropertyAssignment(import_typescript.factory.createIdentifier("__implementedBy"), import_typescript.factory.createArrayLiteralExpression(implementedBy.map((value) => import_typescript.factory.createStringLiteral(value)))));
|
|
152
|
+
}
|
|
153
|
+
if (types) {
|
|
154
|
+
properties.push(import_typescript.factory.createPropertyAssignment(import_typescript.factory.createIdentifier("__types"), import_typescript.factory.createArrayLiteralExpression(types.map((value) => import_typescript.factory.createStringLiteral(value)))));
|
|
155
|
+
}
|
|
128
156
|
return createDeclaration(astNode.name.value, import_typescript.factory.createObjectLiteralExpression([
|
|
157
|
+
...properties,
|
|
129
158
|
import_typescript.factory.createPropertyAssignment(import_typescript.factory.createIdentifier("__resolveType"), import_typescript.factory.createIdentifier("undefined"))
|
|
130
159
|
]));
|
|
131
160
|
}
|
|
@@ -11,6 +11,7 @@ var SPECIFIED_SCALARS = {
|
|
|
11
11
|
Boolean: "GraphQLBoolean"
|
|
12
12
|
};
|
|
13
13
|
function extractImplicitTypesToTypescript(document) {
|
|
14
|
+
var _a, _b;
|
|
14
15
|
const definitions = [];
|
|
15
16
|
const imports = [
|
|
16
17
|
"GraphQLList",
|
|
@@ -22,6 +23,8 @@ function extractImplicitTypesToTypescript(document) {
|
|
|
22
23
|
"GraphQLBoolean"
|
|
23
24
|
];
|
|
24
25
|
const identifiers = [];
|
|
26
|
+
const implementedBy = {};
|
|
27
|
+
const interfaceAstNodes = [];
|
|
25
28
|
for (let astNode of document.definitions) {
|
|
26
29
|
if (astNode.kind === Kind.SCALAR_TYPE_DEFINITION) {
|
|
27
30
|
definitions.push(createScalarType(astNode));
|
|
@@ -35,14 +38,32 @@ function extractImplicitTypesToTypescript(document) {
|
|
|
35
38
|
definitions.push(createEnumType(astNode));
|
|
36
39
|
addToSetArray(imports, "GraphQLEnumType");
|
|
37
40
|
addToSetArray(identifiers, astNode.name.value);
|
|
38
|
-
} else if (astNode.kind === Kind.
|
|
39
|
-
|
|
41
|
+
} else if (astNode.kind === Kind.INTERFACE_TYPE_DEFINITION) {
|
|
42
|
+
interfaceAstNodes.push(astNode);
|
|
43
|
+
addToSetArray(identifiers, astNode.name.value);
|
|
44
|
+
} else if (astNode.kind === Kind.UNION_TYPE_DEFINITION) {
|
|
45
|
+
const types = (_a = astNode.types) == null ? void 0 : _a.map((typeNode) => {
|
|
46
|
+
return typeNode.name.value;
|
|
47
|
+
});
|
|
48
|
+
definitions.push(createAbstractType(astNode, void 0, types));
|
|
40
49
|
addToSetArray(identifiers, astNode.name.value);
|
|
41
50
|
} else if (astNode.kind === Kind.OBJECT_TYPE_DEFINITION) {
|
|
51
|
+
(_b = astNode.interfaces) == null ? void 0 : _b.forEach((node) => {
|
|
52
|
+
if (!implementedBy[node.name.value]) {
|
|
53
|
+
implementedBy[node.name.value] = [];
|
|
54
|
+
}
|
|
55
|
+
implementedBy[node.name.value].push(astNode.name.value);
|
|
56
|
+
});
|
|
42
57
|
definitions.push(createObjectType(astNode));
|
|
43
58
|
addToSetArray(identifiers, astNode.name.value);
|
|
44
59
|
}
|
|
45
60
|
}
|
|
61
|
+
interfaceAstNodes.forEach((astNode) => {
|
|
62
|
+
if (!implementedBy[astNode.name.value]) {
|
|
63
|
+
implementedBy[astNode.name.value] = [];
|
|
64
|
+
}
|
|
65
|
+
definitions.push(createAbstractType(astNode, implementedBy[astNode.name.value]));
|
|
66
|
+
});
|
|
46
67
|
const importDefinition = factory.createImportDeclaration(void 0, void 0, factory.createImportClause(false, void 0, factory.createNamedImports(imports.map((imp) => factory.createImportSpecifier(void 0, factory.createIdentifier(imp))))), factory.createStringLiteral("graphql"));
|
|
47
68
|
const exportDefinition = factory.createVariableStatement([factory.createModifier(ts.SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([
|
|
48
69
|
factory.createVariableDeclaration(factory.createIdentifier("resolvers"), void 0, void 0, factory.createObjectLiteralExpression(identifiers.map((def) => factory.createShorthandPropertyAssignment(factory.createIdentifier(def), void 0))))
|
|
@@ -101,8 +122,16 @@ function createEnumType(astNode) {
|
|
|
101
122
|
])
|
|
102
123
|
]));
|
|
103
124
|
}
|
|
104
|
-
function createAbstractType(astNode) {
|
|
125
|
+
function createAbstractType(astNode, implementedBy, types) {
|
|
126
|
+
const properties = [];
|
|
127
|
+
if (implementedBy) {
|
|
128
|
+
properties.push(factory.createPropertyAssignment(factory.createIdentifier("__implementedBy"), factory.createArrayLiteralExpression(implementedBy.map((value) => factory.createStringLiteral(value)))));
|
|
129
|
+
}
|
|
130
|
+
if (types) {
|
|
131
|
+
properties.push(factory.createPropertyAssignment(factory.createIdentifier("__types"), factory.createArrayLiteralExpression(types.map((value) => factory.createStringLiteral(value)))));
|
|
132
|
+
}
|
|
105
133
|
return createDeclaration(astNode.name.value, factory.createObjectLiteralExpression([
|
|
134
|
+
...properties,
|
|
106
135
|
factory.createPropertyAssignment(factory.createIdentifier("__resolveType"), factory.createIdentifier("undefined"))
|
|
107
136
|
]));
|
|
108
137
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -19,9 +19,11 @@ export declare type InterfaceTypeResolver<TSource = any, TContext = any, TArgs =
|
|
|
19
19
|
[key: string]: FieldResolver<TSource, TContext, TArgs>;
|
|
20
20
|
} & {
|
|
21
21
|
__resolveType?: TypeResolver<any, any>;
|
|
22
|
+
__implementedBy: string[];
|
|
22
23
|
};
|
|
23
24
|
export declare type UnionTypeResolver = {
|
|
24
25
|
__resolveType?: TypeResolver<any, any>;
|
|
26
|
+
__types: string[];
|
|
25
27
|
};
|
|
26
28
|
export declare type InputObjectTypeResolver = GraphQLInputObjectType;
|
|
27
29
|
export declare type Resolver<TSource, TContext> = ObjectTypeResolver<TSource, TContext> | InterfaceTypeResolver<TSource, TContext> | UnionTypeResolver | ScalarTypeResolver | EnumTypeResolver | InputObjectTypeResolver;
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAEjB,YAAY,IAAI,mBAAmB,EACpC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,SAAS,EACT,sBAAsB,EAC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,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACvD,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7C,sBAAsB,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;CACjE;AACD,oBAAY,0BAA0B,GAAG,mBAAmB,GAAG;IAC7D,QAAQ,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,oBAAY,uBAAuB,GAAG,mBAAmB,GAAG;IAC1D,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeResolvers.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeResolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAC9B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,sCAsBvD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
6
|
+
var __objSpread = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
18
|
+
var __export = (target, all) => {
|
|
19
|
+
for (var name in all)
|
|
20
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
21
|
+
};
|
|
22
|
+
__markAsModule(exports);
|
|
23
|
+
__export(exports, {
|
|
24
|
+
mergeResolvers: () => mergeResolvers
|
|
25
|
+
});
|
|
26
|
+
function mergeResolvers(resolvers, extractedResolvers) {
|
|
27
|
+
const fullResolvers = __objSpread({}, extractedResolvers);
|
|
28
|
+
Object.keys(resolvers).forEach((resolverKey) => {
|
|
29
|
+
if (fullResolvers[resolverKey] && typeof resolvers[resolverKey] === "object" && resolvers[resolverKey].constructor === Object) {
|
|
30
|
+
fullResolvers[resolverKey] = __objSpread(__objSpread({}, fullResolvers[resolverKey]), resolvers[resolverKey]);
|
|
31
|
+
} else {
|
|
32
|
+
fullResolvers[resolverKey] = resolvers[resolverKey];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return fullResolvers;
|
|
36
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
6
|
+
var __objSpread = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/utilities/mergeResolvers.ts
|
|
19
|
+
function mergeResolvers(resolvers, extractedResolvers) {
|
|
20
|
+
const fullResolvers = __objSpread({}, extractedResolvers);
|
|
21
|
+
Object.keys(resolvers).forEach((resolverKey) => {
|
|
22
|
+
if (fullResolvers[resolverKey] && typeof resolvers[resolverKey] === "object" && resolvers[resolverKey].constructor === Object) {
|
|
23
|
+
fullResolvers[resolverKey] = __objSpread(__objSpread({}, fullResolvers[resolverKey]), resolvers[resolverKey]);
|
|
24
|
+
} else {
|
|
25
|
+
fullResolvers[resolverKey] = resolvers[resolverKey];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return fullResolvers;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
mergeResolvers
|
|
32
|
+
};
|