@khanacademy/wonder-blocks-data 11.0.4 → 11.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/components/data.js.flow +0 -1
- package/dist/components/gql-router.js.flow +1 -2
- package/dist/components/intercept-context.js.flow +1 -2
- package/dist/components/intercept-requests.js.flow +1 -2
- package/dist/components/track-data.js.flow +1 -2
- package/dist/es/index.js +72 -165
- package/dist/hooks/use-cached-effect.js.flow +1 -2
- package/dist/hooks/use-gql-router-context.js.flow +1 -2
- package/dist/hooks/use-gql.js.flow +1 -2
- package/dist/hooks/use-hydratable-effect.js.flow +1 -2
- package/dist/hooks/use-request-interception.js.flow +1 -2
- package/dist/hooks/use-server-effect.js.flow +1 -2
- package/dist/hooks/use-shared-cache.js.flow +1 -2
- package/dist/index.js +72 -165
- package/dist/index.js.flow +1 -2
- package/dist/util/data-error.js.flow +1 -2
- package/dist/util/get-gql-data-from-response.js.flow +1 -2
- package/dist/util/get-gql-request-id.js.flow +1 -2
- package/dist/util/gql-error.js.flow +1 -2
- package/dist/util/gql-router-context.js.flow +1 -2
- package/dist/util/gql-types.js.flow +1 -2
- package/dist/util/graphql-document-node-parser.js.flow +1 -2
- package/dist/util/graphql-types.js.flow +28 -24
- package/dist/util/hydration-cache-api.js.flow +1 -2
- package/dist/util/merge-gql-context.js.flow +1 -2
- package/dist/util/purge-caches.js.flow +1 -2
- package/dist/util/request-api.js.flow +1 -2
- package/dist/util/request-fulfillment.js.flow +1 -2
- package/dist/util/request-tracking.js.flow +1 -2
- package/dist/util/result-from-cache-response.js.flow +1 -2
- package/dist/util/scoped-in-memory-cache.js.flow +1 -2
- package/dist/util/serializable-in-memory-cache.js.flow +1 -2
- package/dist/util/ssr-cache.js.flow +1 -2
- package/dist/util/status.js.flow +1 -2
- package/dist/util/to-gql-operation.js.flow +1 -2
- package/dist/util/types.js.flow +1 -2
- package/package.json +3 -3
- package/src/util/graphql-types.js.flow +30 -0
- package/src/util/graphql-types.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -33,64 +33,6 @@ const FetchPolicy = {
|
|
|
33
33
|
NetworkOnly: "NetworkOnly"
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
function _typeof(obj) {
|
|
37
|
-
"@babel/helpers - typeof";
|
|
38
|
-
|
|
39
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
40
|
-
return typeof obj;
|
|
41
|
-
} : function (obj) {
|
|
42
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
43
|
-
}, _typeof(obj);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _toPrimitive(input, hint) {
|
|
47
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
48
|
-
var prim = input[Symbol.toPrimitive];
|
|
49
|
-
if (prim !== undefined) {
|
|
50
|
-
var res = prim.call(input, hint || "default");
|
|
51
|
-
if (_typeof(res) !== "object") return res;
|
|
52
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
53
|
-
}
|
|
54
|
-
return (hint === "string" ? String : Number)(input);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function _toPropertyKey(arg) {
|
|
58
|
-
var key = _toPrimitive(arg, "string");
|
|
59
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _defineProperties(target, props) {
|
|
63
|
-
for (var i = 0; i < props.length; i++) {
|
|
64
|
-
var descriptor = props[i];
|
|
65
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
66
|
-
descriptor.configurable = true;
|
|
67
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
68
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
72
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
73
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
74
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
75
|
-
writable: false
|
|
76
|
-
});
|
|
77
|
-
return Constructor;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function _setPrototypeOf(o, p) {
|
|
81
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
82
|
-
o.__proto__ = p;
|
|
83
|
-
return o;
|
|
84
|
-
};
|
|
85
|
-
return _setPrototypeOf(o, p);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _inheritsLoose(subClass, superClass) {
|
|
89
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
90
|
-
subClass.prototype.constructor = subClass;
|
|
91
|
-
_setPrototypeOf(subClass, superClass);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
36
|
const DataErrors = Object.freeze({
|
|
95
37
|
Unknown: "Unknown",
|
|
96
38
|
Internal: "Internal",
|
|
@@ -100,28 +42,28 @@ const DataErrors = Object.freeze({
|
|
|
100
42
|
Parse: "Parse",
|
|
101
43
|
Hydrated: "Hydrated"
|
|
102
44
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
function DataError(message, kind, {
|
|
45
|
+
class DataError extends wonderStuffCore.KindError {
|
|
46
|
+
constructor(message, kind, {
|
|
106
47
|
metadata,
|
|
107
48
|
cause
|
|
108
49
|
} = {}) {
|
|
109
|
-
|
|
50
|
+
super(message, kind, {
|
|
110
51
|
metadata,
|
|
111
52
|
cause,
|
|
112
53
|
name: "Data"
|
|
113
|
-
})
|
|
54
|
+
});
|
|
114
55
|
}
|
|
115
|
-
|
|
116
|
-
}(wonderStuffCore.KindError);
|
|
56
|
+
}
|
|
117
57
|
|
|
118
|
-
|
|
119
|
-
|
|
58
|
+
class ScopedInMemoryCache {
|
|
59
|
+
constructor(initialCache = {}) {
|
|
120
60
|
this._cache = void 0;
|
|
121
61
|
this._cache = initialCache;
|
|
122
62
|
}
|
|
123
|
-
|
|
124
|
-
|
|
63
|
+
get inUse() {
|
|
64
|
+
return Object.keys(this._cache).length > 0;
|
|
65
|
+
}
|
|
66
|
+
set(scope, id, value) {
|
|
125
67
|
var _this$_cache$scope;
|
|
126
68
|
if (!id || typeof id !== "string") {
|
|
127
69
|
throw new DataError("id must be non-empty string", DataErrors.InvalidInput);
|
|
@@ -134,12 +76,12 @@ let ScopedInMemoryCache = function () {
|
|
|
134
76
|
}
|
|
135
77
|
this._cache[scope] = (_this$_cache$scope = this._cache[scope]) != null ? _this$_cache$scope : {};
|
|
136
78
|
this._cache[scope][id] = value;
|
|
137
|
-
}
|
|
138
|
-
|
|
79
|
+
}
|
|
80
|
+
get(scope, id) {
|
|
139
81
|
var _this$_cache$scope$id, _this$_cache$scope2;
|
|
140
82
|
return (_this$_cache$scope$id = (_this$_cache$scope2 = this._cache[scope]) == null ? void 0 : _this$_cache$scope2[id]) != null ? _this$_cache$scope$id : null;
|
|
141
|
-
}
|
|
142
|
-
|
|
83
|
+
}
|
|
84
|
+
purge(scope, id) {
|
|
143
85
|
var _this$_cache$scope3;
|
|
144
86
|
if (!((_this$_cache$scope3 = this._cache[scope]) != null && _this$_cache$scope3[id])) {
|
|
145
87
|
return;
|
|
@@ -148,8 +90,8 @@ let ScopedInMemoryCache = function () {
|
|
|
148
90
|
if (Object.keys(this._cache[scope]).length === 0) {
|
|
149
91
|
delete this._cache[scope];
|
|
150
92
|
}
|
|
151
|
-
}
|
|
152
|
-
|
|
93
|
+
}
|
|
94
|
+
purgeScope(scope, predicate) {
|
|
153
95
|
if (!this._cache[scope]) {
|
|
154
96
|
return;
|
|
155
97
|
}
|
|
@@ -165,8 +107,8 @@ let ScopedInMemoryCache = function () {
|
|
|
165
107
|
if (Object.keys(this._cache[scope]).length === 0) {
|
|
166
108
|
delete this._cache[scope];
|
|
167
109
|
}
|
|
168
|
-
}
|
|
169
|
-
|
|
110
|
+
}
|
|
111
|
+
purgeAll(predicate) {
|
|
170
112
|
if (predicate == null) {
|
|
171
113
|
this._cache = {};
|
|
172
114
|
return;
|
|
@@ -174,32 +116,21 @@ let ScopedInMemoryCache = function () {
|
|
|
174
116
|
for (const scope of Object.keys(this._cache)) {
|
|
175
117
|
this.purgeScope(scope, (id, value) => predicate(scope, id, value));
|
|
176
118
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
}]);
|
|
184
|
-
return ScopedInMemoryCache;
|
|
185
|
-
}();
|
|
186
|
-
|
|
187
|
-
let SerializableInMemoryCache = function (_ScopedInMemoryCache) {
|
|
188
|
-
_inheritsLoose(SerializableInMemoryCache, _ScopedInMemoryCache);
|
|
189
|
-
function SerializableInMemoryCache(initialCache = {}) {
|
|
190
|
-
var _this;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
class SerializableInMemoryCache extends ScopedInMemoryCache {
|
|
123
|
+
constructor(initialCache = {}) {
|
|
191
124
|
try {
|
|
192
|
-
|
|
125
|
+
super(wonderStuffCore.clone(initialCache));
|
|
193
126
|
} catch (e) {
|
|
194
127
|
throw new DataError(`An error occurred trying to initialize from a response cache snapshot: ${e}`, DataErrors.InvalidInput);
|
|
195
128
|
}
|
|
196
|
-
return _this;
|
|
197
129
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
_proto.clone = function clone() {
|
|
130
|
+
set(scope, id, value) {
|
|
131
|
+
super.set(scope, id, Object.freeze(wonderStuffCore.clone(value)));
|
|
132
|
+
}
|
|
133
|
+
clone() {
|
|
203
134
|
try {
|
|
204
135
|
return wonderStuffCore.clone(this._cache);
|
|
205
136
|
} catch (e) {
|
|
@@ -207,14 +138,19 @@ let SerializableInMemoryCache = function (_ScopedInMemoryCache) {
|
|
|
207
138
|
cause: e
|
|
208
139
|
});
|
|
209
140
|
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
}(ScopedInMemoryCache);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
213
143
|
|
|
214
144
|
const DefaultScope$2 = "default";
|
|
215
145
|
let _default$2;
|
|
216
|
-
|
|
217
|
-
|
|
146
|
+
class SsrCache {
|
|
147
|
+
static get Default() {
|
|
148
|
+
if (!_default$2) {
|
|
149
|
+
_default$2 = new SsrCache();
|
|
150
|
+
}
|
|
151
|
+
return _default$2;
|
|
152
|
+
}
|
|
153
|
+
constructor(hydrationCache = null, ssrOnlyCache = null) {
|
|
218
154
|
this._hydrationCache = void 0;
|
|
219
155
|
this._ssrOnlyCache = void 0;
|
|
220
156
|
this.initialize = source => {
|
|
@@ -255,8 +191,7 @@ let SsrCache = function () {
|
|
|
255
191
|
this._ssrOnlyCache = ssrOnlyCache || new SerializableInMemoryCache();
|
|
256
192
|
this._hydrationCache = hydrationCache || new SerializableInMemoryCache();
|
|
257
193
|
}
|
|
258
|
-
|
|
259
|
-
_proto._setCachedResponse = function _setCachedResponse(id, entry, hydrate) {
|
|
194
|
+
_setCachedResponse(id, entry, hydrate) {
|
|
260
195
|
const frozenEntry = Object.freeze(entry);
|
|
261
196
|
if (wonderBlocksCore.Server.isServerSide()) {
|
|
262
197
|
if (hydrate) {
|
|
@@ -266,18 +201,8 @@ let SsrCache = function () {
|
|
|
266
201
|
}
|
|
267
202
|
}
|
|
268
203
|
return frozenEntry;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
key: "Default",
|
|
272
|
-
get: function () {
|
|
273
|
-
if (!_default$2) {
|
|
274
|
-
_default$2 = new SsrCache();
|
|
275
|
-
}
|
|
276
|
-
return _default$2;
|
|
277
|
-
}
|
|
278
|
-
}]);
|
|
279
|
-
return SsrCache;
|
|
280
|
-
}();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
281
206
|
|
|
282
207
|
const initializeHydrationCache = source => SsrCache.Default.initialize(source);
|
|
283
208
|
const purgeHydrationCache = predicate => SsrCache.Default.purgeData(predicate);
|
|
@@ -298,8 +223,8 @@ function _extends() {
|
|
|
298
223
|
}
|
|
299
224
|
|
|
300
225
|
let _default$1;
|
|
301
|
-
|
|
302
|
-
|
|
226
|
+
class RequestFulfillment {
|
|
227
|
+
constructor() {
|
|
303
228
|
this._requests = {};
|
|
304
229
|
this.fulfill = (id, {
|
|
305
230
|
handler,
|
|
@@ -340,22 +265,24 @@ let RequestFulfillment = function () {
|
|
|
340
265
|
Object.keys(this._requests).forEach(id => this.abort(id));
|
|
341
266
|
};
|
|
342
267
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (!_default$1) {
|
|
347
|
-
_default$1 = new RequestFulfillment();
|
|
348
|
-
}
|
|
349
|
-
return _default$1;
|
|
268
|
+
static get Default() {
|
|
269
|
+
if (!_default$1) {
|
|
270
|
+
_default$1 = new RequestFulfillment();
|
|
350
271
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
272
|
+
return _default$1;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
354
275
|
|
|
355
276
|
const TrackerContext = React__namespace.createContext(null);
|
|
356
277
|
let _default;
|
|
357
|
-
|
|
358
|
-
|
|
278
|
+
class RequestTracker {
|
|
279
|
+
static get Default() {
|
|
280
|
+
if (!_default) {
|
|
281
|
+
_default = new RequestTracker();
|
|
282
|
+
}
|
|
283
|
+
return _default;
|
|
284
|
+
}
|
|
285
|
+
constructor(responseCache = undefined) {
|
|
359
286
|
this._trackedRequests = {};
|
|
360
287
|
this._responseCache = void 0;
|
|
361
288
|
this._requestFulfillment = void 0;
|
|
@@ -400,22 +327,10 @@ let RequestTracker = function () {
|
|
|
400
327
|
this._responseCache = responseCache || SsrCache.Default;
|
|
401
328
|
this._requestFulfillment = new RequestFulfillment();
|
|
402
329
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
}], [{
|
|
409
|
-
key: "Default",
|
|
410
|
-
get: function () {
|
|
411
|
-
if (!_default) {
|
|
412
|
-
_default = new RequestTracker();
|
|
413
|
-
}
|
|
414
|
-
return _default;
|
|
415
|
-
}
|
|
416
|
-
}]);
|
|
417
|
-
return RequestTracker;
|
|
418
|
-
}();
|
|
330
|
+
get hasUnfulfilledRequests() {
|
|
331
|
+
return Object.keys(this._trackedRequests).length > 0;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
419
334
|
|
|
420
335
|
const SSRCheck = () => {
|
|
421
336
|
if (wonderBlocksCore.Server.isServerSide()) {
|
|
@@ -471,22 +386,16 @@ const purgeCaches = () => {
|
|
|
471
386
|
purgeHydrationCache();
|
|
472
387
|
};
|
|
473
388
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
function TrackData() {
|
|
477
|
-
return _React$Component.apply(this, arguments) || this;
|
|
478
|
-
}
|
|
479
|
-
var _proto = TrackData.prototype;
|
|
480
|
-
_proto.render = function render() {
|
|
389
|
+
class TrackData extends React__namespace.Component {
|
|
390
|
+
render() {
|
|
481
391
|
if (!wonderBlocksCore.Server.isServerSide()) {
|
|
482
392
|
throw new Error("This component is not for use during client-side rendering");
|
|
483
393
|
}
|
|
484
394
|
return React__namespace.createElement(TrackerContext.Provider, {
|
|
485
395
|
value: RequestTracker.Default.trackDataRequest
|
|
486
396
|
}, this.props.children);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
}(React__namespace.Component);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
490
399
|
|
|
491
400
|
const loadingStatus = Object.freeze({
|
|
492
401
|
status: "loading"
|
|
@@ -708,7 +617,7 @@ const InterceptRequests = ({
|
|
|
708
617
|
children
|
|
709
618
|
}) => {
|
|
710
619
|
const interceptors = React__namespace.useContext(InterceptContext);
|
|
711
|
-
const updatedInterceptors = React__namespace.useMemo(() => [
|
|
620
|
+
const updatedInterceptors = React__namespace.useMemo(() => [...interceptors, interceptor], [interceptors, interceptor]);
|
|
712
621
|
return React__namespace.createElement(InterceptContext.Provider, {
|
|
713
622
|
value: updatedInterceptors
|
|
714
623
|
}, children);
|
|
@@ -764,20 +673,18 @@ const GqlErrors = Object.freeze({
|
|
|
764
673
|
BadResponse: "BadResponse",
|
|
765
674
|
ErrorResult: "ErrorResult"
|
|
766
675
|
});
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
function GqlError(message, kind, {
|
|
676
|
+
class GqlError extends wonderStuffCore.KindError {
|
|
677
|
+
constructor(message, kind, {
|
|
770
678
|
metadata,
|
|
771
679
|
cause
|
|
772
680
|
} = {}) {
|
|
773
|
-
|
|
681
|
+
super(message, kind, {
|
|
774
682
|
metadata,
|
|
775
683
|
cause,
|
|
776
684
|
name: "Gql"
|
|
777
|
-
})
|
|
685
|
+
});
|
|
778
686
|
}
|
|
779
|
-
|
|
780
|
-
}(wonderStuffCore.KindError);
|
|
687
|
+
}
|
|
781
688
|
|
|
782
689
|
const getGqlDataFromResponse = async response => {
|
|
783
690
|
const bodyText = await response.text();
|
package/dist/index.js.flow
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for data
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import { KindError } from "@khanacademy/wonder-stuff-core";
|
|
9
8
|
import type { ErrorOptions } from "./types";
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import { KindError } from "@khanacademy/wonder-stuff-core";
|
|
9
8
|
import type { ErrorOptions } from "./types";
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import * as React from "react";
|
|
9
8
|
import type { GqlRouterConfiguration } from "./gql-types";
|
|
10
9
|
declare export var GqlRouterContext: React.Context<GqlRouterConfiguration<any> | null | void>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import type { DocumentNode, VariableDefinitionNode } from "./graphql-types";
|
|
9
8
|
declare export var DocumentTypes: $ReadOnly<{|
|
|
10
9
|
query: "query",
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// @flow
|
|
2
|
+
// NOTE(somewhatabstract):
|
|
3
|
+
// These types are bare minimum to support document parsing. They're derived
|
|
4
|
+
// from graphql@14.5.8, the last version that provided flow types.
|
|
5
|
+
// Doing this avoids us having to take a dependency on that library just for
|
|
6
|
+
// these types.
|
|
8
7
|
export interface DefinitionNode {
|
|
9
|
-
|
|
8
|
+
+kind: string;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
+
|
|
20
|
-
+
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
|
|
11
|
+
export type VariableDefinitionNode = {
|
|
12
|
+
+kind: "VariableDefinition",
|
|
13
|
+
...
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface OperationDefinitionNode extends DefinitionNode {
|
|
17
|
+
+kind: "OperationDefinition";
|
|
18
|
+
+operation: string;
|
|
19
|
+
+variableDefinitions: $ReadOnlyArray<VariableDefinitionNode>;
|
|
20
|
+
+name?: {|
|
|
21
|
+
+kind: mixed,
|
|
22
|
+
+value: string,
|
|
23
|
+
|};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type DocumentNode = {
|
|
27
|
+
+kind: "Document",
|
|
28
|
+
+definitions: $ReadOnlyArray<DefinitionNode>,
|
|
29
|
+
...
|
|
30
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import type { ValidCacheData, CachedResponse, ResponseCache } from "./types";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import type { Result, ValidCacheData } from "./types";
|
|
9
8
|
declare type RequestCache = {
|
|
10
9
|
[id: string]: Promise<Result<any>>,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import * as React from "react";
|
|
9
8
|
import { SsrCache } from "./ssr-cache";
|
|
10
9
|
import { RequestFulfillment } from "./request-fulfillment";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import type { ValidCacheData, CachedResponse, Result } from "./types";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import type { ScopedCache, RawScopedCache, ValidCacheData } from "./types";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import { ScopedInMemoryCache } from "./scoped-in-memory-cache";
|
|
9
8
|
import type { ValidCacheData, RawScopedCache } from "./types";
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flowtype definitions for
|
|
2
|
+
* Flowtype definitions for data
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
4
|
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import { SerializableInMemoryCache } from "./serializable-in-memory-cache";
|
|
9
8
|
import type { ValidCacheData, CachedResponse, ResponseCache } from "./types";
|
|
10
9
|
|
package/dist/util/status.js.flow
CHANGED