@graphitation/supermassive 0.8.1 → 0.8.4

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 (93) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/README.md +24 -29
  3. package/lib/ast/TypedAST.js +14 -2
  4. package/lib/ast/addTypesToRequestDocument.js +23 -23
  5. package/lib/ast/addTypesToRequestDocument.mjs +8 -5
  6. package/lib/benchmarks/index.js +33 -36
  7. package/lib/benchmarks/index.mjs +101 -92
  8. package/lib/benchmarks/nice-benchmark.js +14 -18
  9. package/lib/benchmarks/nice-benchmark.mjs +2 -3
  10. package/lib/benchmarks/swapi-schema/index.js +19 -20
  11. package/lib/benchmarks/swapi-schema/index.mjs +4 -4
  12. package/lib/benchmarks/swapi-schema/models.js +16 -17
  13. package/lib/benchmarks/swapi-schema/models.mjs +1 -1
  14. package/lib/benchmarks/swapi-schema/resolvers.js +65 -66
  15. package/lib/benchmarks/swapi-schema/resolvers.mjs +51 -48
  16. package/lib/bin/supermassive.d.ts +1 -0
  17. package/lib/bin/supermassive.d.ts.map +1 -1
  18. package/lib/bin/supermassive.js +25 -25
  19. package/lib/bin/supermassive.mjs +8 -7
  20. package/lib/collectFields.js +23 -27
  21. package/lib/collectFields.mjs +10 -10
  22. package/lib/definition.js +15 -19
  23. package/lib/definition.mjs +2 -2
  24. package/lib/directives.js +21 -25
  25. package/lib/directives.mjs +7 -7
  26. package/lib/executeWithSchema.js +15 -19
  27. package/lib/executeWithSchema.mjs +1 -1
  28. package/lib/executeWithoutSchema.js +37 -41
  29. package/lib/executeWithoutSchema.mjs +22 -22
  30. package/lib/extractImplicitTypesRuntime.js +17 -21
  31. package/lib/extractImplicitTypesRuntime.mjs +3 -3
  32. package/lib/extractImplicitTypesToTypescript.js +16 -17
  33. package/lib/extractImplicitTypesToTypescript.mjs +1 -1
  34. package/lib/index.d.ts +2 -1
  35. package/lib/index.d.ts.map +1 -1
  36. package/lib/index.js +24 -26
  37. package/lib/index.mjs +11 -9
  38. package/lib/jsutils/Maybe.js +14 -2
  39. package/lib/jsutils/ObjMap.js +14 -2
  40. package/lib/jsutils/Path.js +17 -5
  41. package/lib/jsutils/Path.mjs +1 -1
  42. package/lib/jsutils/PromiseOrValue.js +14 -2
  43. package/lib/jsutils/devAssert.js +16 -4
  44. package/lib/jsutils/didYouMean.js +16 -4
  45. package/lib/jsutils/identityFunc.js +16 -4
  46. package/lib/jsutils/inspect.js +16 -4
  47. package/lib/jsutils/instanceOf.js +14 -18
  48. package/lib/jsutils/instanceOf.mjs +1 -1
  49. package/lib/jsutils/invariant.js +16 -4
  50. package/lib/jsutils/isAsyncIterable.js +16 -4
  51. package/lib/jsutils/isIterableObject.js +16 -4
  52. package/lib/jsutils/isObjectLike.js +16 -4
  53. package/lib/jsutils/isPromise.js +16 -4
  54. package/lib/jsutils/keyMap.js +17 -5
  55. package/lib/jsutils/keyMap.mjs +1 -1
  56. package/lib/jsutils/keyValMap.js +17 -5
  57. package/lib/jsutils/keyValMap.mjs +1 -1
  58. package/lib/jsutils/mapValue.js +17 -5
  59. package/lib/jsutils/mapValue.mjs +1 -1
  60. package/lib/jsutils/memoize3.js +19 -7
  61. package/lib/jsutils/memoize3.mjs +3 -3
  62. package/lib/jsutils/naturalCompare.js +16 -4
  63. package/lib/jsutils/printPathArray.js +16 -4
  64. package/lib/jsutils/promiseForObject.js +17 -5
  65. package/lib/jsutils/promiseForObject.mjs +1 -1
  66. package/lib/jsutils/promiseReduce.js +14 -18
  67. package/lib/jsutils/promiseReduce.mjs +1 -1
  68. package/lib/jsutils/suggestionList.js +15 -19
  69. package/lib/jsutils/suggestionList.mjs +2 -2
  70. package/lib/jsutils/toObjMap.js +17 -5
  71. package/lib/jsutils/toObjMap.mjs +1 -1
  72. package/lib/subscribeWithSchema.js +15 -19
  73. package/lib/subscribeWithSchema.mjs +1 -1
  74. package/lib/subscribeWithoutSchema.js +26 -30
  75. package/lib/subscribeWithoutSchema.mjs +11 -11
  76. package/lib/transforms/annotateDocumentGraphQLTransform.js +15 -19
  77. package/lib/transforms/annotateDocumentGraphQLTransform.mjs +1 -1
  78. package/lib/transforms/transformerTestUtils.js +24 -25
  79. package/lib/transforms/transformerTestUtils.mjs +12 -16
  80. package/lib/types.js +14 -2
  81. package/lib/utilities/mapAsyncIterator.js +18 -6
  82. package/lib/utilities/mapAsyncIterator.mjs +2 -2
  83. package/lib/utilities/mergeResolvers.js +20 -9
  84. package/lib/utilities/mergeResolvers.mjs +5 -5
  85. package/lib/utilities/typeNameFromAST.js +14 -18
  86. package/lib/utilities/typeNameFromAST.mjs +1 -1
  87. package/lib/values.js +19 -23
  88. package/lib/values.mjs +5 -5
  89. package/package.json +5 -4
  90. package/.eslintcache +0 -1
  91. package/CHANGELOG.json +0 -380
  92. package/lib/benchmarks/swapi-schema/__generated__/schema.d.ts +0 -3
  93. package/lib/benchmarks/swapi-schema/__generated__/schema.d.ts.map +0 -1
package/CHANGELOG.json DELETED
@@ -1,380 +0,0 @@
1
- {
2
- "name": "@graphitation/supermassive",
3
- "entries": [
4
- {
5
- "date": "Thu, 10 Feb 2022 13:09:46 GMT",
6
- "tag": "@graphitation/supermassive_v0.8.0",
7
- "version": "0.8.0",
8
- "comments": {
9
- "minor": [
10
- {
11
- "author": "jakubvejr@microsoft.com",
12
- "package": "@graphitation/supermassive",
13
- "commit": "a12b07ea264c714c3a1a4594084cfe9145e0a3a8",
14
- "comment": "Resolvers merge is not required before using executeWithoutSchema"
15
- }
16
- ]
17
- }
18
- },
19
- {
20
- "date": "Mon, 07 Feb 2022 09:13:38 GMT",
21
- "tag": "@graphitation/supermassive_v0.7.2",
22
- "version": "0.7.2",
23
- "comments": {
24
- "patch": [
25
- {
26
- "author": "jakubvejr@microsoft.com",
27
- "package": "@graphitation/supermassive",
28
- "commit": "e424c9cafe96e42a28edecf8ea1ef3500d7b071b",
29
- "comment": "tests use extracted resolvers from typescript file"
30
- }
31
- ]
32
- }
33
- },
34
- {
35
- "date": "Fri, 04 Feb 2022 11:53:40 GMT",
36
- "tag": "@graphitation/supermassive_v0.7.1",
37
- "version": "0.7.1",
38
- "comments": {
39
- "patch": [
40
- {
41
- "author": "jakubvejr@microsoft.com",
42
- "package": "@graphitation/supermassive",
43
- "commit": "943230ef7535d211f99a7ea8a54cc5e80a50754c",
44
- "comment": "ensureValidRuntimeType error messages modified"
45
- }
46
- ]
47
- }
48
- },
49
- {
50
- "date": "Thu, 03 Feb 2022 09:30:26 GMT",
51
- "tag": "@graphitation/supermassive_v0.7.0",
52
- "version": "0.7.0",
53
- "comments": {
54
- "minor": [
55
- {
56
- "author": "jakubvejr@microsoft.com",
57
- "package": "@graphitation/supermassive",
58
- "commit": "8de2f546c23c6d09c6461ca291873ed22660566f",
59
- "comment": "check whether a fragment is applicable to the given type"
60
- }
61
- ]
62
- }
63
- },
64
- {
65
- "date": "Wed, 26 Jan 2022 09:11:30 GMT",
66
- "tag": "@graphitation/supermassive_v0.6.3",
67
- "version": "0.6.3",
68
- "comments": {
69
- "patch": [
70
- {
71
- "author": "jakubvejr@microsoft.com",
72
- "package": "@graphitation/supermassive",
73
- "commit": "db06c5c33b72f611a7a7aca25a7d2f2b808a6d60",
74
- "comment": "getArgumentValues fix"
75
- }
76
- ]
77
- }
78
- },
79
- {
80
- "date": "Tue, 25 Jan 2022 09:56:59 GMT",
81
- "tag": "@graphitation/supermassive_v0.6.1",
82
- "version": "0.6.1",
83
- "comments": {
84
- "none": [
85
- {
86
- "author": "mnovikov@microsoft.com",
87
- "package": "@graphitation/supermassive",
88
- "commit": "5fddfaa87809a5e094f61cb2bbd3f1b69202e7f1",
89
- "comment": "Add prettierrc, add it to linter and force it to do it"
90
- }
91
- ]
92
- }
93
- },
94
- {
95
- "date": "Mon, 24 Jan 2022 13:40:52 GMT",
96
- "tag": "@graphitation/supermassive_v0.6.1",
97
- "version": "0.6.1",
98
- "comments": {
99
- "patch": [
100
- {
101
- "author": "mnovikov@microsoft.com",
102
- "package": "@graphitation/supermassive",
103
- "commit": "ce2d4f019baf1717202a3c33ec0d75fa3b5a4fb3",
104
- "comment": "Fix Webpack 4 compat"
105
- }
106
- ]
107
- }
108
- },
109
- {
110
- "date": "Mon, 24 Jan 2022 11:18:59 GMT",
111
- "tag": "@graphitation/supermassive_v0.6.0",
112
- "version": "0.6.0",
113
- "comments": {
114
- "minor": [
115
- {
116
- "author": "jakubvejr@microsoft.com",
117
- "package": "@graphitation/supermassive",
118
- "commit": "6f7d0728d4f196601758acde6fb2b02477201df5",
119
- "comment": "Directives implemented"
120
- }
121
- ]
122
- }
123
- },
124
- {
125
- "date": "Wed, 19 Jan 2022 13:39:52 GMT",
126
- "tag": "@graphitation/supermassive_v0.5.2",
127
- "version": "0.5.2",
128
- "comments": {
129
- "patch": [
130
- {
131
- "author": "jakubvejr@microsoft.com",
132
- "package": "@graphitation/supermassive",
133
- "commit": "bbcd6d2d5fe95073e9bea820f92298f397edda26",
134
- "comment": "Export AST types"
135
- }
136
- ]
137
- }
138
- },
139
- {
140
- "date": "Tue, 18 Jan 2022 12:29:14 GMT",
141
- "tag": "@graphitation/supermassive_v0.5.1",
142
- "version": "0.5.1",
143
- "comments": {
144
- "patch": [
145
- {
146
- "author": "jakubvejr@microsoft.com",
147
- "package": "@graphitation/supermassive",
148
- "commit": "e48a7490997e1c9cd3487c1b2c178c56c1ce5a1b",
149
- "comment": "Reexported type fixed"
150
- }
151
- ]
152
- }
153
- },
154
- {
155
- "date": "Tue, 18 Jan 2022 09:59:51 GMT",
156
- "tag": "@graphitation/supermassive_v0.5.0",
157
- "version": "0.5.0",
158
- "comments": {
159
- "minor": [
160
- {
161
- "author": "jakubvejr@microsoft.com",
162
- "package": "@graphitation/supermassive",
163
- "commit": "6a2790e55986f1ae77c6abacdc7e7b81255c68f2",
164
- "comment": "Added support for subscribe operation"
165
- }
166
- ]
167
- }
168
- },
169
- {
170
- "date": "Fri, 14 Jan 2022 11:15:34 GMT",
171
- "tag": "@graphitation/supermassive_v0.4.5",
172
- "version": "0.4.5",
173
- "comments": {
174
- "patch": [
175
- {
176
- "author": "mnovikov@microsoft.com",
177
- "package": "@graphitation/supermassive",
178
- "commit": "9882765303f4e5ff5820e243ab498d9627825d8b",
179
- "comment": "Make sideffects false actually work"
180
- }
181
- ]
182
- }
183
- },
184
- {
185
- "date": "Fri, 14 Jan 2022 10:12:20 GMT",
186
- "tag": "@graphitation/supermassive_v0.4.4",
187
- "version": "0.4.4",
188
- "comments": {
189
- "patch": [
190
- {
191
- "author": "mnovikov@microsoft.com",
192
- "package": "@graphitation/supermassive",
193
- "commit": "31a3867a32c3001ded73331c7a546057eb480a62",
194
- "comment": "Add side-effects false to all production packages for webpack opt"
195
- }
196
- ]
197
- }
198
- },
199
- {
200
- "date": "Mon, 10 Jan 2022 12:12:59 GMT",
201
- "tag": "@graphitation/supermassive_v0.4.3",
202
- "version": "0.4.3",
203
- "comments": {
204
- "patch": [
205
- {
206
- "author": "vladimir.razuvaev@gmail.com",
207
- "package": "@graphitation/supermassive",
208
- "commit": "d76697496d8501bdbab6e4f4ace0d12910c37647",
209
- "comment": "Unpin typescript dependency"
210
- }
211
- ]
212
- }
213
- },
214
- {
215
- "date": "Thu, 23 Dec 2021 13:01:22 GMT",
216
- "tag": "@graphitation/supermassive_v0.4.2",
217
- "version": "0.4.2",
218
- "comments": {
219
- "none": [
220
- {
221
- "author": "eloy.de.enige@gmail.com",
222
- "package": "@graphitation/supermassive",
223
- "commit": "bbbe8844858f53ceed2bd1c8790d3aff43b919df",
224
- "comment": "[package] Add repo details to other packages and template"
225
- }
226
- ]
227
- }
228
- },
229
- {
230
- "date": "Thu, 23 Dec 2021 12:10:32 GMT",
231
- "tag": "@graphitation/supermassive_v0.4.2",
232
- "version": "0.4.2",
233
- "comments": {
234
- "patch": [
235
- {
236
- "author": "mnovikov@microsoft.com",
237
- "package": "@graphitation/supermassive",
238
- "commit": "50a46ca3ff490d63949a5e77949b5269d7c4ab6a",
239
- "comment": "Fix require in supermassive cli"
240
- }
241
- ]
242
- }
243
- },
244
- {
245
- "date": "Thu, 23 Dec 2021 11:32:16 GMT",
246
- "tag": "@graphitation/supermassive_v0.4.1",
247
- "version": "0.4.1",
248
- "comments": {
249
- "patch": [
250
- {
251
- "author": "mnovikov@microsoft.com",
252
- "package": "@graphitation/supermassive",
253
- "commit": "29d360b06e346a1f04fd20826fd2005da9f15a74",
254
- "comment": "Add graphql-js notice"
255
- }
256
- ]
257
- }
258
- },
259
- {
260
- "date": "Thu, 23 Dec 2021 11:31:14 GMT",
261
- "tag": "@graphitation/supermassive_v0.4.0",
262
- "version": "0.4.0",
263
- "comments": {
264
- "minor": [
265
- {
266
- "author": "mnovikov@microsoft.com",
267
- "package": "@graphitation/supermassive",
268
- "commit": "d3baa5116dc93bba4e38e5beb7f23c3edbbb0680",
269
- "comment": "Added proper mjs builds (bump for main release)"
270
- }
271
- ]
272
- }
273
- },
274
- {
275
- "date": "Tue, 14 Dec 2021 10:13:54 GMT",
276
- "tag": "@graphitation/supermassive_v0.3.0",
277
- "version": "0.3.0",
278
- "comments": {
279
- "minor": [
280
- {
281
- "author": "mnovikov@microsoft.com",
282
- "package": "@graphitation/supermassive",
283
- "commit": "fad5f1bc587470a2c85bf5763bb102a179a592b2",
284
- "comment": "Support ESM in distro packages"
285
- }
286
- ]
287
- }
288
- },
289
- {
290
- "date": "Thu, 09 Dec 2021 14:41:56 GMT",
291
- "tag": "@graphitation/supermassive_v0.2.0",
292
- "version": "0.2.0",
293
- "comments": {
294
- "none": [
295
- {
296
- "comment": "Expand on what/why/how",
297
- "author": "eloy.de.enige@gmail.com",
298
- "commit": "7db88d6e25f7de28b92750c3e1908b5096078e3e",
299
- "package": "@graphitation/supermassive"
300
- }
301
- ]
302
- }
303
- },
304
- {
305
- "date": "Fri, 26 Nov 2021 15:43:37 GMT",
306
- "tag": "@graphitation/supermassive_v0.2.0",
307
- "version": "0.2.0",
308
- "comments": {
309
- "minor": [
310
- {
311
- "comment": "Updated supermassive to be more suitable for usage",
312
- "author": "mnovikov@microsoft.com",
313
- "commit": "640e0b5d7ae7a8338346dd8b88a7dda7b2d9a060",
314
- "package": "@graphitation/supermassive"
315
- }
316
- ]
317
- }
318
- },
319
- {
320
- "date": "Tue, 26 Oct 2021 21:09:29 GMT",
321
- "tag": "@graphitation/supermassive_v0.1.3",
322
- "version": "0.1.3",
323
- "comments": {
324
- "patch": [
325
- {
326
- "comment": "Bump @graphitation/graphql-js-tag to v0.5.5",
327
- "author": "modevold@microsoft.com",
328
- "commit": "6fbd717cb21f2e9f49ddca58e0365b5381358b46",
329
- "package": "@graphitation/supermassive"
330
- }
331
- ]
332
- }
333
- },
334
- {
335
- "date": "Tue, 26 Oct 2021 12:46:12 GMT",
336
- "tag": "@graphitation/supermassive_v0.1.2",
337
- "version": "0.1.2",
338
- "comments": {
339
- "patch": [
340
- {
341
- "comment": "Align graphql dependency to version ^15.0.0 across packages",
342
- "author": "modevold@microsoft.com",
343
- "commit": "d8b94fe7725a968abfac81953b97a879b2bdaeb3",
344
- "package": "@graphitation/supermassive"
345
- }
346
- ]
347
- }
348
- },
349
- {
350
- "date": "Mon, 04 Oct 2021 13:48:04 GMT",
351
- "tag": "@graphitation/supermassive_v0.1.1",
352
- "version": "0.1.1",
353
- "comments": {
354
- "patch": [
355
- {
356
- "comment": "Bump @graphitation/graphql-js-tag to v0.5.4",
357
- "author": "eloy.de.enige@gmail.com",
358
- "commit": "ceb24aa25210090e38251be53d010d75abdad9ba",
359
- "package": "@graphitation/supermassive"
360
- }
361
- ]
362
- }
363
- },
364
- {
365
- "date": "Thu, 24 Jun 2021 12:32:15 GMT",
366
- "tag": "@graphitation/supermassive_v0.1.0",
367
- "version": "0.1.0",
368
- "comments": {
369
- "none": [
370
- {
371
- "comment": "Test and benchmark setup for supermassive",
372
- "author": "eloy.de.enige@gmail.com",
373
- "commit": "ebbad29ec11dae814bbe8c2e492d1baf5382c138",
374
- "package": "@graphitation/supermassive"
375
- }
376
- ]
377
- }
378
- }
379
- ]
380
- }
@@ -1,3 +0,0 @@
1
- import { Resolvers } from "@graphitation/supermassive";
2
- export declare const resolvers: Resolvers;
3
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/benchmarks/swapi-schema/__generated__/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkF,MAAM,4BAA4B,CAAC;AAcvI,eAAO,MAAM,SAAS,EAAE,SAAqI,CAAC"}