@graphitation/supermassive 0.6.0 → 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.
Files changed (45) hide show
  1. package/.eslintcache +1 -1
  2. package/CHANGELOG.json +61 -1
  3. package/CHANGELOG.md +26 -2
  4. package/README.md +4 -4
  5. package/lib/collectFields.d.ts.map +1 -1
  6. package/lib/collectFields.js +33 -5
  7. package/lib/collectFields.mjs +33 -5
  8. package/lib/definition.d.ts +3 -0
  9. package/lib/definition.d.ts.map +1 -1
  10. package/lib/definition.js +9 -1
  11. package/lib/definition.mjs +9 -1
  12. package/lib/executeWithSchema.d.ts.map +1 -1
  13. package/lib/executeWithSchema.js +3 -17
  14. package/lib/executeWithSchema.mjs +4 -21
  15. package/lib/executeWithoutSchema.d.ts.map +1 -1
  16. package/lib/executeWithoutSchema.js +2 -1
  17. package/lib/executeWithoutSchema.mjs +2 -1
  18. package/lib/extractImplicitTypesRuntime.d.ts.map +1 -1
  19. package/lib/extractImplicitTypesRuntime.js +24 -3
  20. package/lib/extractImplicitTypesRuntime.mjs +24 -3
  21. package/lib/extractImplicitTypesToTypescript.d.ts.map +1 -1
  22. package/lib/extractImplicitTypesToTypescript.js +32 -3
  23. package/lib/extractImplicitTypesToTypescript.mjs +32 -3
  24. package/lib/jsutils/Path.d.ts +1 -1
  25. package/lib/jsutils/keyMap.d.ts +1 -1
  26. package/lib/jsutils/keyValMap.d.ts +1 -1
  27. package/lib/jsutils/mapValue.d.ts +1 -1
  28. package/lib/jsutils/promiseForObject.d.ts +1 -1
  29. package/lib/jsutils/promiseReduce.d.ts +1 -1
  30. package/lib/jsutils/toObjMap.d.ts +1 -1
  31. package/lib/subscribeWithSchema.d.ts.map +1 -1
  32. package/lib/subscribeWithSchema.js +1 -2
  33. package/lib/subscribeWithSchema.mjs +2 -3
  34. package/lib/types.d.ts +2 -0
  35. package/lib/types.d.ts.map +1 -1
  36. package/lib/utilities/mergeResolvers.d.ts +3 -0
  37. package/lib/utilities/mergeResolvers.d.ts.map +1 -0
  38. package/lib/utilities/mergeResolvers.js +36 -0
  39. package/lib/utilities/mergeResolvers.mjs +32 -0
  40. package/lib/values.d.ts.map +1 -1
  41. package/lib/values.js +1 -0
  42. package/lib/values.mjs +1 -0
  43. package/package.json +3 -3
  44. package/resources/starwars.json +1 -1
  45. package/starwars.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":5252,"mtime":1643022982528,"results":"55","hashOfConfig":"56"},{"size":3107,"mtime":1643022982528,"results":"57","hashOfConfig":"56"},{"size":7241,"mtime":1643022982528,"results":"58","hashOfConfig":"56"},{"size":14345,"mtime":1643022982528,"results":"59","hashOfConfig":"56"},{"size":5291,"mtime":1643022982528,"results":"60","hashOfConfig":"56"},{"size":2186,"mtime":1643022982528,"results":"61","hashOfConfig":"56"},{"size":3145,"mtime":1643022982528,"results":"62","hashOfConfig":"56"},{"size":712,"mtime":1643022982528,"results":"63","hashOfConfig":"56"},{"size":381,"mtime":1643022982528,"results":"64","hashOfConfig":"56"},{"size":128,"mtime":1643022982528,"results":"65","hashOfConfig":"56"},{"size":10205,"mtime":1643022982528,"results":"66","hashOfConfig":"56"},{"size":846,"mtime":1643022982532,"results":"67","hashOfConfig":"56"},{"size":1650,"mtime":1643022982532,"results":"68","hashOfConfig":"56"},{"size":4172,"mtime":1643022982532,"results":"69","hashOfConfig":"56"},{"size":3431,"mtime":1643022982532,"results":"70","hashOfConfig":"56"},{"size":1212,"mtime":1643022982532,"results":"71","hashOfConfig":"56"},{"size":6583,"mtime":1643022982532,"results":"72","hashOfConfig":"56"},{"size":1387,"mtime":1643022982532,"results":"73","hashOfConfig":"56"},{"size":27153,"mtime":1643022982532,"results":"74","hashOfConfig":"56"},{"size":3998,"mtime":1643022982532,"results":"75","hashOfConfig":"56"},{"size":10386,"mtime":1643022982532,"results":"76","hashOfConfig":"56"},{"size":1595,"mtime":1643022982532,"results":"77","hashOfConfig":"56"},{"size":134,"mtime":1643022982532,"results":"78","hashOfConfig":"56"},{"size":277,"mtime":1643022982532,"results":"79","hashOfConfig":"56"},{"size":711,"mtime":1643022982532,"results":"80","hashOfConfig":"56"},{"size":48,"mtime":1643022982532,"results":"81","hashOfConfig":"56"},{"size":269,"mtime":1643022982532,"results":"82","hashOfConfig":"56"},{"size":1038,"mtime":1643022982532,"results":"83","hashOfConfig":"56"},{"size":108,"mtime":1643022982532,"results":"84","hashOfConfig":"56"},{"size":2797,"mtime":1643022982532,"results":"85","hashOfConfig":"56"},{"size":2294,"mtime":1643022982532,"results":"86","hashOfConfig":"56"},{"size":357,"mtime":1643022982532,"results":"87","hashOfConfig":"56"},{"size":325,"mtime":1643022982532,"results":"88","hashOfConfig":"56"},{"size":778,"mtime":1643022982532,"results":"89","hashOfConfig":"56"},{"size":278,"mtime":1643022982532,"results":"90","hashOfConfig":"56"},{"size":227,"mtime":1643022982532,"results":"91","hashOfConfig":"56"},{"size":921,"mtime":1643022982532,"results":"92","hashOfConfig":"56"},{"size":764,"mtime":1643022982532,"results":"93","hashOfConfig":"56"},{"size":441,"mtime":1643022982532,"results":"94","hashOfConfig":"56"},{"size":821,"mtime":1643022982532,"results":"95","hashOfConfig":"56"},{"size":1314,"mtime":1643022982532,"results":"96","hashOfConfig":"56"},{"size":253,"mtime":1643022982532,"results":"97","hashOfConfig":"56"},{"size":650,"mtime":1643022982532,"results":"98","hashOfConfig":"56"},{"size":803,"mtime":1643022982532,"results":"99","hashOfConfig":"56"},{"size":3938,"mtime":1643022982532,"results":"100","hashOfConfig":"56"},{"size":503,"mtime":1643022982532,"results":"101","hashOfConfig":"56"},{"size":1438,"mtime":1643022982532,"results":"102","hashOfConfig":"56"},{"size":8927,"mtime":1643022982532,"results":"103","hashOfConfig":"56"},{"size":495,"mtime":1643022982532,"results":"104","hashOfConfig":"56"},{"size":6644,"mtime":1643022982532,"results":"105","hashOfConfig":"56"},{"size":3824,"mtime":1643022982532,"results":"106","hashOfConfig":"56"},{"size":1813,"mtime":1643022982532,"results":"107","hashOfConfig":"56"},{"size":308,"mtime":1643022982532,"results":"108","hashOfConfig":"56"},{"size":9274,"mtime":1643022982532,"results":"109","hashOfConfig":"56"},{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2qg1xb",{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"152","messages":"153","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"212","messages":"213","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","errorCount":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,67 @@
2
2
  "name": "@graphitation/supermassive",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 24 Jan 2022 11:18:49 GMT",
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",
21
+ "tag": "@graphitation/supermassive_v0.6.3",
22
+ "version": "0.6.3",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "jakubvejr@microsoft.com",
27
+ "package": "@graphitation/supermassive",
28
+ "commit": "db06c5c33b72f611a7a7aca25a7d2f2b808a6d60",
29
+ "comment": "getArgumentValues fix"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Tue, 25 Jan 2022 09:56:59 GMT",
36
+ "tag": "@graphitation/supermassive_v0.6.1",
37
+ "version": "0.6.1",
38
+ "comments": {
39
+ "none": [
40
+ {
41
+ "author": "mnovikov@microsoft.com",
42
+ "package": "@graphitation/supermassive",
43
+ "commit": "5fddfaa87809a5e094f61cb2bbd3f1b69202e7f1",
44
+ "comment": "Add prettierrc, add it to linter and force it to do it"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Mon, 24 Jan 2022 13:40:52 GMT",
51
+ "tag": "@graphitation/supermassive_v0.6.1",
52
+ "version": "0.6.1",
53
+ "comments": {
54
+ "patch": [
55
+ {
56
+ "author": "mnovikov@microsoft.com",
57
+ "package": "@graphitation/supermassive",
58
+ "commit": "ce2d4f019baf1717202a3c33ec0d75fa3b5a4fb3",
59
+ "comment": "Fix Webpack 4 compat"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Mon, 24 Jan 2022 11:18:59 GMT",
6
66
  "tag": "@graphitation/supermassive_v0.6.0",
7
67
  "version": "0.6.0",
8
68
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - @graphitation/supermassive
2
2
 
3
- This log was last generated on Mon, 24 Jan 2022 11:18:49 GMT and should not be manually modified.
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
+
15
+ ## 0.6.3
16
+
17
+ Wed, 26 Jan 2022 09:11:30 GMT
18
+
19
+ ### Patches
20
+
21
+ - getArgumentValues fix (jakubvejr@microsoft.com)
22
+
23
+ ## 0.6.1
24
+
25
+ Mon, 24 Jan 2022 13:40:52 GMT
26
+
27
+ ### Patches
28
+
29
+ - Fix Webpack 4 compat (mnovikov@microsoft.com)
30
+
7
31
  ## 0.6.0
8
32
 
9
- Mon, 24 Jan 2022 11:18:49 GMT
33
+ Mon, 24 Jan 2022 11:18:59 GMT
10
34
 
11
35
  ### Minor changes
12
36
 
package/README.md CHANGED
@@ -95,17 +95,17 @@ function visitSelectionSet(parentType, selectionSet, parentSource) {
95
95
  if (isScalarType(type)) {
96
96
  result[selection.name] = parentType.invokeFieldResolver(
97
97
  selection.name,
98
- parentSource
98
+ parentSource,
99
99
  );
100
100
  } else if (isObjectType(type)) {
101
101
  const source = parentType.invokeFieldResolver(
102
102
  selection.name,
103
- parentSource
103
+ parentSource,
104
104
  );
105
105
  result[selection.name] = visitSelectionSet(
106
106
  type,
107
107
  selection.selectionSet,
108
- source
108
+ source,
109
109
  );
110
110
  } else {
111
111
  // ...
@@ -128,7 +128,7 @@ execute(
128
128
  name
129
129
  }
130
130
  }
131
- `)
131
+ `),
132
132
  );
133
133
  ```
134
134
 
@@ -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;AAI/C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;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"}
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"}
@@ -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
- if (typeConditionNode.name.value === typeName) {
92
+ const conditionalType = (0, import_typeNameFromAST.typeNameFromAST)(typeConditionNode);
93
+ if (conditionalType === typeName) {
91
94
  return true;
92
95
  }
93
- return false;
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;
@@ -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
- if (typeConditionNode.name.value === typeName) {
67
+ const conditionalType = typeNameFromAST(typeConditionNode);
68
+ if (conditionalType === typeName) {
66
69
  return true;
67
70
  }
68
- return false;
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;
@@ -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
@@ -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;AAOjB,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"}
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
+ }
@@ -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":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAa,eAAe,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAE9E,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,CA2B3D"}
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"}
@@ -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)
@@ -38,9 +24,9 @@ __markAsModule(exports);
38
24
  __export(exports, {
39
25
  executeWithSchema: () => executeWithSchema
40
26
  });
41
- var import_schema = __toModule(require("@graphql-tools/schema"));
42
27
  var import_graphql = __toModule(require("graphql"));
43
28
  var import_index = __toModule(require("./index"));
29
+ var import_mergeResolvers = __toModule(require("./utilities/mergeResolvers"));
44
30
  function executeWithSchema({
45
31
  typeDefs,
46
32
  resolvers,
@@ -52,7 +38,7 @@ function executeWithSchema({
52
38
  fieldResolver,
53
39
  typeResolver
54
40
  }) {
55
- const schema = (0, import_schema.makeExecutableSchema)({typeDefs, resolvers});
41
+ const schema = (0, import_graphql.buildASTSchema)(typeDefs);
56
42
  let extractedResolvers = {};
57
43
  const getTypeByName = (name) => {
58
44
  const type = import_index.specifiedScalars[name] || extractedResolvers[name];
@@ -63,7 +49,7 @@ function executeWithSchema({
63
49
  }
64
50
  };
65
51
  extractedResolvers = (0, import_index.extractImplicitTypes)(typeDefs, getTypeByName);
66
- const fullResolvers = __objSpread(__objSpread({}, extractedResolvers), resolvers);
52
+ const fullResolvers = (0, import_mergeResolvers.mergeResolvers)(resolvers, extractedResolvers);
67
53
  const document = (0, import_index.addTypesToRequestDocument)(schema, rawDocument);
68
54
  return (0, import_index.executeWithoutSchema)({
69
55
  document,
@@ -1,29 +1,12 @@
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
- import {makeExecutableSchema} from "@graphql-tools/schema";
20
- import {isInputType} from "graphql";
2
+ import {isInputType, buildASTSchema} from "graphql";
21
3
  import {
22
4
  addTypesToRequestDocument,
23
5
  executeWithoutSchema,
24
6
  extractImplicitTypes,
25
7
  specifiedScalars
26
8
  } from "./index.mjs";
9
+ import {mergeResolvers} from "./utilities/mergeResolvers.mjs";
27
10
  function executeWithSchema({
28
11
  typeDefs,
29
12
  resolvers,
@@ -35,7 +18,7 @@ function executeWithSchema({
35
18
  fieldResolver,
36
19
  typeResolver
37
20
  }) {
38
- const schema = makeExecutableSchema({typeDefs, resolvers});
21
+ const schema = buildASTSchema(typeDefs);
39
22
  let extractedResolvers = {};
40
23
  const getTypeByName = (name) => {
41
24
  const type = specifiedScalars[name] || extractedResolvers[name];
@@ -46,7 +29,7 @@ function executeWithSchema({
46
29
  }
47
30
  };
48
31
  extractedResolvers = extractImplicitTypes(typeDefs, getTypeByName);
49
- const fullResolvers = __objSpread(__objSpread({}, extractedResolvers), resolvers);
32
+ const fullResolvers = mergeResolvers(resolvers, extractedResolvers);
50
33
  const document = addTypesToRequestDocument(schema, rawDocument);
51
34
  return executeWithoutSchema({
52
35
  document,
@@ -1 +1 @@
1
- {"version":3,"file":"executeWithoutSchema.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AAE,MAAM,GAAG,OAAO,CAAA;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 ("__resolveType" in returnType) {
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 ("__resolveType" in returnType) {
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,EAcZ,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,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,CAuB9B"}
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.UNION_TYPE_DEFINITION || astNode.kind === import_graphql.Kind.INTERFACE_TYPE_DEFINITION) {
43
- result[astNode.name.value] = {__resolveType: void 0};
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.UNION_TYPE_DEFINITION || astNode.kind === Kind.INTERFACE_TYPE_DEFINITION) {
28
- result[astNode.name.value] = {__resolveType: void 0};
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,EAYb,MAAM,SAAS,CAAC;AAUjB,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,YAAY,GACrB,EAAE,CAAC,UAAU,CAmFf"}
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.UNION_TYPE_DEFINITION || astNode.kind === import_graphql.Kind.INTERFACE_TYPE_DEFINITION) {
62
- definitions.push(createAbstractType(astNode));
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.UNION_TYPE_DEFINITION || astNode.kind === Kind.INTERFACE_TYPE_DEFINITION) {
39
- definitions.push(createAbstractType(astNode));
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
  }
@@ -1,4 +1,4 @@
1
- import type { Maybe } from './Maybe';
1
+ import type { Maybe } from "./Maybe";
2
2
  export interface Path {
3
3
  readonly prev: Path | undefined;
4
4
  readonly key: string | number;
@@ -1,4 +1,4 @@
1
- import type { ObjMap } from './ObjMap';
1
+ import type { ObjMap } from "./ObjMap";
2
2
  /**
3
3
  * Creates a keyed JS object from an array, given a function to produce the keys
4
4
  * for each value in the array.
@@ -1,4 +1,4 @@
1
- import type { ObjMap } from './ObjMap';
1
+ import type { ObjMap } from "./ObjMap";
2
2
  /**
3
3
  * Creates a keyed JS object from an array, given a function to produce the keys
4
4
  * and a function to produce the values from each item in the array.
@@ -1,4 +1,4 @@
1
- import type { ObjMap, ReadOnlyObjMap } from './ObjMap';
1
+ import type { ObjMap, ReadOnlyObjMap } from "./ObjMap";
2
2
  /**
3
3
  * Creates an object map with the same keys as `map` and values generated by
4
4
  * running each value of `map` thru `fn`.
@@ -1,4 +1,4 @@
1
- import type { ObjMap } from './ObjMap';
1
+ import type { ObjMap } from "./ObjMap";
2
2
  /**
3
3
  * This function transforms a JS object `ObjMap<Promise<T>>` into
4
4
  * a `Promise<ObjMap<T>>`
@@ -1,4 +1,4 @@
1
- import type { PromiseOrValue } from './PromiseOrValue';
1
+ import type { PromiseOrValue } from "./PromiseOrValue";
2
2
  /**
3
3
  * Similar to Array.prototype.reduce(), however the reducing callback may return
4
4
  * a Promise, in which case reduction will continue after each promise resolves.
@@ -1,4 +1,4 @@
1
- import type { ObjMap, ObjMapLike, ReadOnlyObjMap, ReadOnlyObjMapLike } from './ObjMap';
1
+ import type { ObjMap, ObjMapLike, ReadOnlyObjMap, ReadOnlyObjMapLike } from "./ObjMap";
2
2
  export declare function toObjMap<T>(obj: ObjMapLike<T>): ObjMap<T>;
3
3
  export declare function toObjMap<T>(obj: ReadOnlyObjMapLike<T>): ReadOnlyObjMap<T>;
4
4
  //# sourceMappingURL=toObjMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeWithSchema.d.ts","sourceRoot":"","sources":["../src/subscribeWithSchema.ts"],"names":[],"mappings":"AASA,OAAO,EAAa,eAAe,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAE9E,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,WAAW,EACrB,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,EAAE,uBAAuB,GAAG,OAAO,CAClC,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,eAAe,CAC9D,CA6BA"}
1
+ {"version":3,"file":"subscribeWithSchema.d.ts","sourceRoot":"","sources":["../src/subscribeWithSchema.ts"],"names":[],"mappings":"AAQA,OAAO,EAAa,eAAe,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAE9E,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,WAAW,EACrB,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,EAAE,uBAAuB,GAAG,OAAO,CAClC,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,eAAe,CAC9D,CA6BA"}
@@ -38,7 +38,6 @@ __markAsModule(exports);
38
38
  __export(exports, {
39
39
  subscribeWithSchema: () => subscribeWithSchema
40
40
  });
41
- var import_schema = __toModule(require("@graphql-tools/schema"));
42
41
  var import_graphql = __toModule(require("graphql"));
43
42
  var import_index = __toModule(require("./index"));
44
43
  function subscribeWithSchema({
@@ -52,7 +51,7 @@ function subscribeWithSchema({
52
51
  fieldResolver,
53
52
  typeResolver
54
53
  }) {
55
- const schema = (0, import_schema.makeExecutableSchema)({typeDefs, resolvers});
54
+ const schema = (0, import_graphql.buildASTSchema)(typeDefs);
56
55
  let extractedResolvers = {};
57
56
  const getTypeByName = (name) => {
58
57
  const type = import_index.specifiedScalars[name] || extractedResolvers[name];
@@ -16,8 +16,7 @@ var __objSpread = (a, b) => {
16
16
  };
17
17
 
18
18
  // src/subscribeWithSchema.ts
19
- import {makeExecutableSchema} from "@graphql-tools/schema";
20
- import {isInputType} from "graphql";
19
+ import {isInputType, buildASTSchema} from "graphql";
21
20
  import {
22
21
  addTypesToRequestDocument,
23
22
  subscribeWithoutSchema,
@@ -35,7 +34,7 @@ function subscribeWithSchema({
35
34
  fieldResolver,
36
35
  typeResolver
37
36
  }) {
38
- const schema = makeExecutableSchema({typeDefs, resolvers});
37
+ const schema = buildASTSchema(typeDefs);
39
38
  let extractedResolvers = {};
40
39
  const getTypeByName = (name) => {
41
40
  const type = specifiedScalars[name] || extractedResolvers[name];
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;
@@ -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,EACtB,uBAAuB,EACvB,QAAQ,EACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,oBAAY,kBAAkB,GAAG,iBAAiB,CAAC;AACnD,oBAAY,gBAAgB,GAAG,eAAe,CAAC;AAC/C,oBAAY,qBAAqB,CAC/B,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,GAAG,GAAG,IACX,CACF,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,WAAW,KACd,OAAO,CAAC;AAEb,oBAAY,aAAa,CACvB,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,GAAG,GAAG,IAEX,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,GACxD;I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AAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB,CACvC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,EACvB,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;IAE7B,MAAM,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;IACxD,aAAa,CAAC,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,3 @@
1
+ import { Resolvers, Resolver } from "../types";
2
+ export declare function mergeResolvers(resolvers: Resolvers<any, any>, extractedResolvers: Record<string, Resolver<any, any>>): Record<string, Resolver<any, any>>;
3
+ //# sourceMappingURL=mergeResolvers.d.ts.map
@@ -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
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAMZ,iBAAiB,EAYlB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,aAAa,EACb,SAAS,EAET,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AAG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,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GACtC;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAqEjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,gBAAgB,EAC9B,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;CAAE,EACnD,SAAS,EAAE,SAAS,EACpB,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GACtC,SAAS,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAS7C;AAMD,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAMhE,CAAC"}
package/lib/values.js CHANGED
@@ -108,6 +108,7 @@ function getArgumentValues(resolvers, node, variableValues) {
108
108
  } else if ((0, import_graphql.isNonNullType)(argType)) {
109
109
  throw new import_graphql.GraphQLError(`Argument "${name}" of required type "${(0, import_inspect.inspect)(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`, valueNode);
110
110
  }
111
+ continue;
111
112
  }
112
113
  isNull = !variableValues || variableValues[variableName] == null;
113
114
  }
package/lib/values.mjs CHANGED
@@ -95,6 +95,7 @@ function getArgumentValues(resolvers, node, variableValues) {
95
95
  } else if (isNonNullType(argType)) {
96
96
  throw new GraphQLError(`Argument "${name}" of required type "${inspect(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`, valueNode);
97
97
  }
98
+ continue;
98
99
  }
99
100
  isNull = !variableValues || variableValues[variableName] == null;
100
101
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@graphitation/supermassive",
3
3
  "license": "MIT",
4
- "version": "0.6.0",
4
+ "version": "0.7.0",
5
5
  "bin": {
6
6
  "supermassive": "./bin/supermassive.js"
7
7
  },
8
- "main": "./lib/index.js",
8
+ "main": "./lib/index",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/microsoft/graphitation.git",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@graphitation/graphql-js-tag": "*",
24
+ "@graphql-tools/schema": "^7.1.5",
24
25
  "@ts-morph/bootstrap": "^0.11.0",
25
26
  "@types/benchmark": "^2.1.0",
26
27
  "@types/jest": "^26.0.22",
@@ -36,7 +37,6 @@
36
37
  "access": "public",
37
38
  "publishConfig": {},
38
39
  "dependencies": {
39
- "@graphql-tools/schema": "^7.1.5",
40
40
  "commander": "^8.3.0",
41
41
  "graphql": "^15.6.1",
42
42
  "typescript": "^4.4.3"
@@ -1 +1 @@
1
- {}
1
+ {}
package/starwars.json CHANGED
@@ -1 +1 @@
1
- {}
1
+ {}