@isograph/react 0.0.0-main-3f26c9c8 → 0.0.0-main-84b67b62
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/.turbo/turbo-compile-libs.log +1 -1
- package/dist/core/IsographEnvironment.d.ts +9 -6
- package/dist/core/IsographEnvironment.d.ts.map +1 -1
- package/dist/core/IsographEnvironment.js +7 -1
- package/dist/core/cache.d.ts +2 -1
- package/dist/core/cache.d.ts.map +1 -1
- package/dist/core/cache.js +17 -27
- package/dist/core/check.d.ts.map +1 -1
- package/dist/core/check.js +10 -7
- package/dist/core/garbageCollection.d.ts +2 -1
- package/dist/core/garbageCollection.d.ts.map +1 -1
- package/dist/core/garbageCollection.js +21 -13
- package/dist/core/logging.d.ts +3 -2
- package/dist/core/logging.d.ts.map +1 -1
- package/dist/core/makeNetworkRequest.d.ts.map +1 -1
- package/dist/core/makeNetworkRequest.js +10 -1
- package/dist/core/optimisticProxy.d.ts +51 -0
- package/dist/core/optimisticProxy.d.ts.map +1 -0
- package/dist/core/optimisticProxy.js +372 -0
- package/dist/core/read.d.ts.map +1 -1
- package/dist/core/read.js +5 -4
- package/dist/core/startUpdate.d.ts +2 -1
- package/dist/core/startUpdate.d.ts.map +1 -1
- package/dist/core/startUpdate.js +31 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/core/IsographEnvironment.ts +16 -6
- package/src/core/cache.ts +21 -14
- package/src/core/check.ts +11 -6
- package/src/core/garbageCollection.ts +27 -15
- package/src/core/logging.ts +2 -2
- package/src/core/makeNetworkRequest.ts +14 -1
- package/src/core/optimisticProxy.ts +510 -0
- package/src/core/read.ts +2 -1
- package/src/core/startUpdate.ts +44 -28
- package/src/index.ts +1 -1
- package/src/tests/garbageCollection.test.ts +2 -2
- package/src/tests/normalizeData.test.ts +5 -3
- package/src/tests/optimisticProxy.test.ts +860 -0
- package/src/tests/startUpdate.test.ts +7 -5
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createIsographEnvironment,
|
|
5
5
|
createIsographStore,
|
|
6
6
|
ROOT_ID,
|
|
7
|
-
type
|
|
7
|
+
type BaseStoreLayerData,
|
|
8
8
|
} from '../core/IsographEnvironment';
|
|
9
9
|
import {
|
|
10
10
|
readButDoNotEvaluate,
|
|
@@ -35,12 +35,14 @@ describe('normalizeData', () => {
|
|
|
35
35
|
|
|
36
36
|
normalizeData(
|
|
37
37
|
environment,
|
|
38
|
+
environment.store,
|
|
38
39
|
entrypoint.networkRequestInfo.normalizationAst.selections,
|
|
39
40
|
{
|
|
40
41
|
query: { node____id___v_id: { __typename: 'Economist', id: '1' } },
|
|
41
42
|
},
|
|
42
43
|
{ id: '1' },
|
|
43
44
|
{ __link: ROOT_ID, __typename: entrypoint.concreteType },
|
|
45
|
+
new Map(),
|
|
44
46
|
);
|
|
45
47
|
|
|
46
48
|
expect(store).toStrictEqual({
|
|
@@ -62,13 +64,13 @@ describe('normalizeData', () => {
|
|
|
62
64
|
},
|
|
63
65
|
},
|
|
64
66
|
},
|
|
65
|
-
} satisfies
|
|
67
|
+
} satisfies BaseStoreLayerData);
|
|
66
68
|
});
|
|
67
69
|
});
|
|
68
70
|
|
|
69
71
|
describe('readData', () => {
|
|
70
72
|
test('nested Query should be read', () => {
|
|
71
|
-
const store:
|
|
73
|
+
const store: BaseStoreLayerData = {
|
|
72
74
|
Economist: {
|
|
73
75
|
'1': {
|
|
74
76
|
__typename: 'Economist',
|