Skip to content

Commit b7d13c4

Browse files
committed
test
1 parent 5e130c9 commit b7d13c4

File tree

4 files changed

+626
-58
lines changed

4 files changed

+626
-58
lines changed

libs/isograph-react/schema.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type Query {
88
type Economist implements Node {
99
id: ID!
1010
name: String!
11+
nickname: String
1112
predecessor: Economist
1213
successor: Economist
1314
}

libs/isograph-react/src/tests/garbageCollection.test.ts

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,45 @@ import { nodeFieldRetainedQuery } from './nodeQuery';
1515
const getDefaultStore = (): IsographStore => ({
1616
Query: {
1717
[ROOT_ID]: {
18-
me: { __link: '0', __typename: 'Economist' },
19-
you: { __link: '1', __typename: 'Economist' },
20-
node____id___0: {
21-
__link: '0',
22-
__typename: 'Economist',
18+
errors: {},
19+
record: {
20+
me: { __link: '0', __typename: 'Economist' },
21+
you: { __link: '1', __typename: 'Economist' },
22+
node____id___0: {
23+
__link: '0',
24+
__typename: 'Economist',
25+
},
2326
},
2427
},
2528
},
2629
Economist: {
2730
0: {
28-
__typename: 'Economist',
29-
id: '0',
30-
name: 'Jeremy Bentham',
31-
successor: { __link: '1', __typename: 'Economist' },
31+
errors: {},
32+
record: {
33+
__typename: 'Economist',
34+
id: '0',
35+
name: 'Jeremy Bentham',
36+
successor: { __link: '1', __typename: 'Economist' },
37+
},
3238
},
3339
1: {
34-
__typename: 'Economist',
35-
id: '1',
36-
name: 'John Stuart Mill',
37-
predecessor: { __link: '0', __typename: 'Economist' },
38-
successor: { __link: '2', __typename: 'Economist' },
40+
errors: {},
41+
record: {
42+
__typename: 'Economist',
43+
id: '1',
44+
name: 'John Stuart Mill',
45+
predecessor: { __link: '0', __typename: 'Economist' },
46+
successor: { __link: '2', __typename: 'Economist' },
47+
},
3948
},
4049
2: {
41-
__typename: 'Economist',
42-
id: '2',
43-
name: 'Henry Sidgwick',
44-
predecessor: { __link: '1', __typename: 'Economist' },
50+
errors: {},
51+
record: {
52+
__typename: 'Economist',
53+
id: '2',
54+
name: 'Henry Sidgwick',
55+
predecessor: { __link: '1', __typename: 'Economist' },
56+
},
4557
},
4658
},
4759
});

0 commit comments

Comments
 (0)