@graphitation/supermassive 0.4.5 → 0.6.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 (44) hide show
  1. package/.eslintcache +1 -1
  2. package/CHANGELOG.json +61 -1
  3. package/CHANGELOG.md +34 -2
  4. package/lib/benchmarks/swapi-schema/resolvers.d.ts.map +1 -1
  5. package/lib/benchmarks/swapi-schema/resolvers.js +56 -0
  6. package/lib/benchmarks/swapi-schema/resolvers.mjs +41 -0
  7. package/lib/collectFields.d.ts.map +1 -1
  8. package/lib/collectFields.js +18 -4
  9. package/lib/collectFields.mjs +18 -4
  10. package/lib/definition.d.ts +4 -0
  11. package/lib/definition.d.ts.map +1 -0
  12. package/lib/definition.js +50 -0
  13. package/lib/definition.mjs +28 -0
  14. package/lib/directives.d.ts +79 -0
  15. package/lib/directives.d.ts.map +1 -0
  16. package/lib/directives.js +155 -0
  17. package/lib/directives.mjs +138 -0
  18. package/lib/executeWithoutSchema.d.ts +6 -5
  19. package/lib/executeWithoutSchema.d.ts.map +1 -1
  20. package/lib/executeWithoutSchema.js +5 -1
  21. package/lib/executeWithoutSchema.mjs +5 -1
  22. package/lib/index.d.ts +3 -0
  23. package/lib/index.d.ts.map +1 -1
  24. package/lib/index.js +5 -1
  25. package/lib/index.mjs +5 -1
  26. package/lib/subscribeWithSchema.d.ts +3 -0
  27. package/lib/subscribeWithSchema.d.ts.map +1 -0
  28. package/lib/subscribeWithSchema.js +78 -0
  29. package/lib/subscribeWithSchema.mjs +64 -0
  30. package/lib/subscribeWithoutSchema.d.ts +57 -0
  31. package/lib/subscribeWithoutSchema.d.ts.map +1 -0
  32. package/lib/subscribeWithoutSchema.js +155 -0
  33. package/lib/subscribeWithoutSchema.mjs +144 -0
  34. package/lib/types.d.ts +7 -2
  35. package/lib/types.d.ts.map +1 -1
  36. package/lib/utilities/mapAsyncIterator.d.ts +7 -0
  37. package/lib/utilities/mapAsyncIterator.d.ts.map +1 -0
  38. package/lib/utilities/mapAsyncIterator.js +71 -0
  39. package/lib/utilities/mapAsyncIterator.mjs +66 -0
  40. package/lib/values.d.ts +4 -3
  41. package/lib/values.d.ts.map +1 -1
  42. package/lib/values.js +6 -2
  43. package/lib/values.mjs +6 -2
  44. package/package.json +2 -1
package/lib/values.mjs CHANGED
@@ -106,8 +106,12 @@ function getArgumentValues(resolvers, node, variableValues) {
106
106
  }
107
107
  return coercedValues;
108
108
  }
109
- function getDirectiveValues(resolvers, node, variableValues) {
110
- throw new Error("Todo");
109
+ function getDirectiveValues(directiveDef, node, resolvers, variableValues) {
110
+ var _a;
111
+ const directiveNode = (_a = node.directives) == null ? void 0 : _a.find((directive) => directive.name.value === directiveDef.name);
112
+ if (directiveNode) {
113
+ return getArgumentValues(resolvers, directiveNode, variableValues);
114
+ }
111
115
  }
112
116
  function hasOwnProperty(obj, prop) {
113
117
  return Object.prototype.hasOwnProperty.call(obj, prop);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphitation/supermassive",
3
3
  "license": "MIT",
4
- "version": "0.4.5",
4
+ "version": "0.6.0",
5
5
  "bin": {
6
6
  "supermassive": "./bin/supermassive.js"
7
7
  },
@@ -27,6 +27,7 @@
27
27
  "@types/node-json-db": "^0.9.3",
28
28
  "benchmark": "^2.1.4",
29
29
  "graphql-jit": "^0.5.1",
30
+ "iterall": "^1.3.0",
30
31
  "monorepo-scripts": "*",
31
32
  "node-json-db": "^1.3.0",
32
33
  "ts-node": "^10.0.0"