@isograph/react 0.3.1 → 0.4.1
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 +5 -0
- package/dist/core/FragmentReference.d.ts +5 -5
- package/dist/core/FragmentReference.d.ts.map +1 -1
- package/dist/core/IsographEnvironment.d.ts +15 -10
- package/dist/core/IsographEnvironment.d.ts.map +1 -1
- package/dist/core/PromiseWrapper.d.ts +4 -4
- package/dist/core/PromiseWrapper.d.ts.map +1 -1
- package/dist/core/PromiseWrapper.js +2 -9
- package/dist/core/areEqualWithDeepComparison.d.ts +1 -3
- package/dist/core/areEqualWithDeepComparison.d.ts.map +1 -1
- package/dist/core/areEqualWithDeepComparison.js +0 -2
- package/dist/core/brand.d.ts +2 -0
- package/dist/core/brand.d.ts.map +1 -0
- package/dist/core/brand.js +2 -0
- package/dist/core/cache.d.ts +7 -6
- package/dist/core/cache.d.ts.map +1 -1
- package/dist/core/cache.js +57 -36
- package/dist/core/check.d.ts +3 -3
- package/dist/core/check.d.ts.map +1 -1
- package/dist/core/componentCache.d.ts.map +1 -1
- package/dist/core/componentCache.js +3 -2
- package/dist/core/entrypoint.d.ts +20 -2
- package/dist/core/entrypoint.d.ts.map +1 -1
- package/dist/core/garbageCollection.d.ts +2 -2
- package/dist/core/garbageCollection.d.ts.map +1 -1
- package/dist/core/logging.d.ts +13 -4
- package/dist/core/logging.d.ts.map +1 -1
- package/dist/core/makeNetworkRequest.d.ts +3 -3
- package/dist/core/makeNetworkRequest.d.ts.map +1 -1
- package/dist/core/makeNetworkRequest.js +15 -15
- package/dist/core/read.d.ts +8 -8
- package/dist/core/read.d.ts.map +1 -1
- package/dist/core/read.js +98 -29
- package/dist/core/reader.d.ts +12 -8
- package/dist/core/reader.d.ts.map +1 -1
- package/dist/core/startUpdate.d.ts +7 -4
- package/dist/core/startUpdate.d.ts.map +1 -1
- package/dist/core/startUpdate.js +153 -5
- package/dist/core/util.d.ts +2 -1
- package/dist/core/util.d.ts.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/loadable-hooks/useConnectionSpecPagination.d.ts.map +1 -1
- package/dist/loadable-hooks/useConnectionSpecPagination.js +1 -1
- package/dist/loadable-hooks/useImperativeExposedMutationField.d.ts +1 -1
- package/dist/loadable-hooks/useImperativeExposedMutationField.d.ts.map +1 -1
- package/dist/loadable-hooks/useImperativeExposedMutationField.js +1 -1
- package/dist/loadable-hooks/useImperativeLoadableField.d.ts +1 -1
- package/dist/loadable-hooks/useImperativeLoadableField.d.ts.map +1 -1
- package/dist/loadable-hooks/useImperativeLoadableField.js +1 -1
- package/dist/loadable-hooks/useSkipLimitPagination.d.ts.map +1 -1
- package/dist/loadable-hooks/useSkipLimitPagination.js +1 -1
- package/dist/react/FragmentReader.d.ts +7 -13
- package/dist/react/FragmentReader.d.ts.map +1 -1
- package/dist/react/FragmentReader.js +3 -30
- package/dist/react/FragmentRenderer.d.ts +15 -0
- package/dist/react/FragmentRenderer.d.ts.map +1 -0
- package/dist/react/FragmentRenderer.js +35 -0
- package/dist/react/LoadableFieldReader.d.ts +12 -0
- package/dist/react/LoadableFieldReader.d.ts.map +1 -0
- package/dist/react/LoadableFieldReader.js +10 -0
- package/dist/react/LoadableFieldRenderer.d.ts +13 -0
- package/dist/react/LoadableFieldRenderer.d.ts.map +1 -0
- package/dist/react/LoadableFieldRenderer.js +37 -0
- package/dist/react/useImperativeReference.d.ts.map +1 -1
- package/dist/react/useImperativeReference.js +6 -6
- package/dist/react/useResult.d.ts.map +1 -1
- package/dist/react/useResult.js +1 -1
- package/package.json +4 -5
- package/src/core/FragmentReference.ts +16 -7
- package/src/core/IsographEnvironment.ts +20 -10
- package/src/core/PromiseWrapper.ts +13 -16
- package/src/core/areEqualWithDeepComparison.ts +5 -5
- package/src/core/brand.ts +18 -0
- package/src/core/cache.ts +74 -51
- package/src/core/check.ts +4 -4
- package/src/core/componentCache.ts +7 -2
- package/src/core/entrypoint.ts +32 -5
- package/src/core/garbageCollection.ts +3 -3
- package/src/core/logging.ts +16 -4
- package/src/core/makeNetworkRequest.ts +48 -23
- package/src/core/read.ts +153 -48
- package/src/core/reader.ts +11 -7
- package/src/core/startUpdate.ts +313 -7
- package/src/core/util.ts +4 -2
- package/src/index.ts +11 -3
- package/src/loadable-hooks/useConnectionSpecPagination.ts +1 -0
- package/src/loadable-hooks/useImperativeExposedMutationField.ts +2 -2
- package/src/loadable-hooks/useImperativeLoadableField.ts +2 -2
- package/src/loadable-hooks/useSkipLimitPagination.ts +1 -0
- package/src/react/FragmentReader.tsx +23 -39
- package/src/react/FragmentRenderer.tsx +46 -0
- package/src/react/LoadableFieldReader.tsx +40 -0
- package/src/react/LoadableFieldRenderer.tsx +41 -0
- package/src/react/useImperativeReference.ts +9 -8
- package/src/react/useResult.ts +1 -0
- package/src/tests/__isograph/Economist/link/output_type.ts +2 -0
- package/src/tests/__isograph/Node/asEconomist/resolver_reader.ts +28 -0
- package/src/tests/__isograph/Node/link/output_type.ts +3 -0
- package/src/tests/__isograph/Query/linkedUpdate/entrypoint.ts +31 -0
- package/src/tests/__isograph/Query/linkedUpdate/normalization_ast.ts +95 -0
- package/src/tests/__isograph/Query/linkedUpdate/output_type.ts +3 -0
- package/src/tests/__isograph/Query/linkedUpdate/param_type.ts +51 -0
- package/src/tests/__isograph/Query/linkedUpdate/query_text.ts +20 -0
- package/src/tests/__isograph/Query/linkedUpdate/resolver_reader.ts +93 -0
- package/src/tests/__isograph/Query/meName/entrypoint.ts +4 -1
- package/src/tests/__isograph/Query/meName/query_text.ts +1 -1
- package/src/tests/__isograph/Query/meName/resolver_reader.ts +1 -0
- package/src/tests/__isograph/Query/meNameSuccessor/entrypoint.ts +4 -1
- package/src/tests/__isograph/Query/meNameSuccessor/query_text.ts +1 -1
- package/src/tests/__isograph/Query/meNameSuccessor/resolver_reader.ts +3 -0
- package/src/tests/__isograph/Query/nodeField/entrypoint.ts +4 -1
- package/src/tests/__isograph/Query/nodeField/query_text.ts +1 -1
- package/src/tests/__isograph/Query/nodeField/resolver_reader.ts +1 -0
- package/src/tests/__isograph/Query/startUpdate/entrypoint.ts +31 -0
- package/src/tests/__isograph/Query/startUpdate/normalization_ast.ts +51 -0
- package/src/tests/__isograph/Query/startUpdate/output_type.ts +3 -0
- package/src/tests/__isograph/Query/startUpdate/param_type.ts +26 -0
- package/src/tests/__isograph/Query/startUpdate/parameters_type.ts +3 -0
- package/src/tests/__isograph/Query/startUpdate/query_text.ts +11 -0
- package/src/tests/__isograph/Query/startUpdate/resolver_reader.ts +55 -0
- package/src/tests/__isograph/Query/subquery/entrypoint.ts +4 -1
- package/src/tests/__isograph/Query/subquery/query_text.ts +1 -1
- package/src/tests/__isograph/Query/subquery/resolver_reader.ts +2 -0
- package/src/tests/__isograph/iso.ts +21 -1
- package/src/tests/__isograph/tsconfig.json +8 -0
- package/src/tests/normalizeData.test.ts +0 -1
- package/src/tests/startUpdate.test.ts +205 -0
- package/.turbo/turbo-compile-typescript.log +0 -4
package/src/react/useResult.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EagerReaderArtifact, ReaderAst, Link } from '@isograph/react';
|
|
2
|
+
|
|
3
|
+
const readerAst: ReaderAst<{ data: any, parameters: Record<PropertyKey, never> }> = [
|
|
4
|
+
{
|
|
5
|
+
kind: "Scalar",
|
|
6
|
+
fieldName: "__typename",
|
|
7
|
+
alias: null,
|
|
8
|
+
arguments: null,
|
|
9
|
+
isUpdatable: false,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
kind: "Link",
|
|
13
|
+
alias: "link",
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const artifact: EagerReaderArtifact<
|
|
18
|
+
{ data: any, parameters: Record<PropertyKey, never> },
|
|
19
|
+
Link<"Economist"> | null
|
|
20
|
+
> = {
|
|
21
|
+
kind: "EagerReaderArtifact",
|
|
22
|
+
fieldName: "Node.asEconomist",
|
|
23
|
+
resolver: ({ data }) => data.__typename === "Economist" ? data.link : null,
|
|
24
|
+
readerAst,
|
|
25
|
+
hasUpdatable: false,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default artifact;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {IsographEntrypoint, NormalizationAst, RefetchQueryNormalizationArtifactWrapper} from '@isograph/react';
|
|
2
|
+
import {Query__linkedUpdate__param} from './param_type';
|
|
3
|
+
import {Query__linkedUpdate__output_type} from './output_type';
|
|
4
|
+
import readerResolver from './resolver_reader';
|
|
5
|
+
import queryText from './query_text';
|
|
6
|
+
import normalizationAst from './normalization_ast';
|
|
7
|
+
const nestedRefetchQueries: RefetchQueryNormalizationArtifactWrapper[] = [];
|
|
8
|
+
|
|
9
|
+
const artifact: IsographEntrypoint<
|
|
10
|
+
Query__linkedUpdate__param,
|
|
11
|
+
Query__linkedUpdate__output_type,
|
|
12
|
+
NormalizationAst
|
|
13
|
+
> = {
|
|
14
|
+
kind: "Entrypoint",
|
|
15
|
+
networkRequestInfo: {
|
|
16
|
+
kind: "NetworkRequestInfo",
|
|
17
|
+
operation: {
|
|
18
|
+
kind: "Operation",
|
|
19
|
+
text: queryText,
|
|
20
|
+
},
|
|
21
|
+
normalizationAst,
|
|
22
|
+
},
|
|
23
|
+
concreteType: "Query",
|
|
24
|
+
readerWithRefetchQueries: {
|
|
25
|
+
kind: "ReaderWithRefetchQueries",
|
|
26
|
+
nestedRefetchQueries,
|
|
27
|
+
readerArtifact: readerResolver,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default artifact;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type {NormalizationAst} from '@isograph/react';
|
|
2
|
+
const normalizationAst: NormalizationAst = {
|
|
3
|
+
kind: "NormalizationAst",
|
|
4
|
+
selections: [
|
|
5
|
+
{
|
|
6
|
+
kind: "Linked",
|
|
7
|
+
fieldName: "node",
|
|
8
|
+
arguments: [
|
|
9
|
+
[
|
|
10
|
+
"id",
|
|
11
|
+
{ kind: "Literal", value: 0 },
|
|
12
|
+
],
|
|
13
|
+
],
|
|
14
|
+
concreteType: null,
|
|
15
|
+
selections: [
|
|
16
|
+
{
|
|
17
|
+
kind: "Scalar",
|
|
18
|
+
fieldName: "__typename",
|
|
19
|
+
arguments: null,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
kind: "Scalar",
|
|
23
|
+
fieldName: "id",
|
|
24
|
+
arguments: null,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
kind: "InlineFragment",
|
|
28
|
+
type: "Economist",
|
|
29
|
+
selections: [
|
|
30
|
+
{
|
|
31
|
+
kind: "Scalar",
|
|
32
|
+
fieldName: "__typename",
|
|
33
|
+
arguments: null,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
kind: "Scalar",
|
|
37
|
+
fieldName: "id",
|
|
38
|
+
arguments: null,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
kind: "Scalar",
|
|
42
|
+
fieldName: "name",
|
|
43
|
+
arguments: null,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "Linked",
|
|
51
|
+
fieldName: "node",
|
|
52
|
+
arguments: [
|
|
53
|
+
[
|
|
54
|
+
"id",
|
|
55
|
+
{ kind: "Literal", value: 1 },
|
|
56
|
+
],
|
|
57
|
+
],
|
|
58
|
+
concreteType: null,
|
|
59
|
+
selections: [
|
|
60
|
+
{
|
|
61
|
+
kind: "Scalar",
|
|
62
|
+
fieldName: "__typename",
|
|
63
|
+
arguments: null,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
kind: "Scalar",
|
|
67
|
+
fieldName: "id",
|
|
68
|
+
arguments: null,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "InlineFragment",
|
|
72
|
+
type: "Economist",
|
|
73
|
+
selections: [
|
|
74
|
+
{
|
|
75
|
+
kind: "Scalar",
|
|
76
|
+
fieldName: "__typename",
|
|
77
|
+
arguments: null,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
kind: "Scalar",
|
|
81
|
+
fieldName: "id",
|
|
82
|
+
arguments: null,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
kind: "Scalar",
|
|
86
|
+
fieldName: "name",
|
|
87
|
+
arguments: null,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
export default normalizationAst;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Node__link__output_type } from '../../Node/link/output_type';
|
|
2
|
+
import type { StartUpdate } from '@isograph/react';
|
|
3
|
+
|
|
4
|
+
export type Query__linkedUpdate__param = {
|
|
5
|
+
readonly data: {
|
|
6
|
+
readonly node: ({
|
|
7
|
+
/**
|
|
8
|
+
A client pointer for the Economist type.
|
|
9
|
+
*/
|
|
10
|
+
readonly asEconomist: ({
|
|
11
|
+
readonly name: string,
|
|
12
|
+
} | null),
|
|
13
|
+
} | null),
|
|
14
|
+
readonly john_stuart_mill: ({
|
|
15
|
+
/**
|
|
16
|
+
A store Link for the Node type.
|
|
17
|
+
*/
|
|
18
|
+
readonly link: Node__link__output_type,
|
|
19
|
+
/**
|
|
20
|
+
A client pointer for the Economist type.
|
|
21
|
+
*/
|
|
22
|
+
readonly asEconomist: ({
|
|
23
|
+
readonly name: string,
|
|
24
|
+
} | null),
|
|
25
|
+
} | null),
|
|
26
|
+
},
|
|
27
|
+
readonly parameters: Record<PropertyKey, never>,
|
|
28
|
+
readonly startUpdate: StartUpdate<{
|
|
29
|
+
get node(): ({
|
|
30
|
+
/**
|
|
31
|
+
A client pointer for the Economist type.
|
|
32
|
+
*/
|
|
33
|
+
readonly asEconomist: ({
|
|
34
|
+
name: string,
|
|
35
|
+
} | null),
|
|
36
|
+
} | null),
|
|
37
|
+
set node(value: ({ link: Node__link__output_type } | null)),
|
|
38
|
+
readonly john_stuart_mill: ({
|
|
39
|
+
/**
|
|
40
|
+
A store Link for the Node type.
|
|
41
|
+
*/
|
|
42
|
+
readonly link: Node__link__output_type,
|
|
43
|
+
/**
|
|
44
|
+
A client pointer for the Economist type.
|
|
45
|
+
*/
|
|
46
|
+
readonly asEconomist: ({
|
|
47
|
+
readonly name: string,
|
|
48
|
+
} | null),
|
|
49
|
+
} | null),
|
|
50
|
+
}>,
|
|
51
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default 'query linkedUpdate {\
|
|
2
|
+
node____id___l_0: node(id: 0) {\
|
|
3
|
+
__typename,\
|
|
4
|
+
id,\
|
|
5
|
+
... on Economist {\
|
|
6
|
+
__typename,\
|
|
7
|
+
id,\
|
|
8
|
+
name,\
|
|
9
|
+
},\
|
|
10
|
+
},\
|
|
11
|
+
node____id___l_1: node(id: 1) {\
|
|
12
|
+
__typename,\
|
|
13
|
+
id,\
|
|
14
|
+
... on Economist {\
|
|
15
|
+
__typename,\
|
|
16
|
+
id,\
|
|
17
|
+
name,\
|
|
18
|
+
},\
|
|
19
|
+
},\
|
|
20
|
+
}';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { EagerReaderArtifact, ReaderAst } from '@isograph/react';
|
|
2
|
+
import { Query__linkedUpdate__param } from './param_type';
|
|
3
|
+
import { Query__linkedUpdate__output_type } from './output_type';
|
|
4
|
+
import { linkedUpdate as resolver } from '../../../startUpdate.test';
|
|
5
|
+
import Node__asEconomist__resolver_reader from '../../Node/asEconomist/resolver_reader';
|
|
6
|
+
|
|
7
|
+
const readerAst: ReaderAst<Query__linkedUpdate__param> = [
|
|
8
|
+
{
|
|
9
|
+
kind: "Linked",
|
|
10
|
+
fieldName: "node",
|
|
11
|
+
alias: null,
|
|
12
|
+
arguments: [
|
|
13
|
+
[
|
|
14
|
+
"id",
|
|
15
|
+
{ kind: "Literal", value: 0 },
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
condition: null,
|
|
19
|
+
isUpdatable: true,
|
|
20
|
+
selections: [
|
|
21
|
+
{
|
|
22
|
+
kind: "Linked",
|
|
23
|
+
fieldName: "asEconomist",
|
|
24
|
+
alias: null,
|
|
25
|
+
arguments: null,
|
|
26
|
+
condition: Node__asEconomist__resolver_reader,
|
|
27
|
+
isUpdatable: false,
|
|
28
|
+
selections: [
|
|
29
|
+
{
|
|
30
|
+
kind: "Scalar",
|
|
31
|
+
fieldName: "name",
|
|
32
|
+
alias: null,
|
|
33
|
+
arguments: null,
|
|
34
|
+
isUpdatable: true,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
refetchQueryIndex: null,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
refetchQueryIndex: null,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
kind: "Linked",
|
|
44
|
+
fieldName: "node",
|
|
45
|
+
alias: "john_stuart_mill",
|
|
46
|
+
arguments: [
|
|
47
|
+
[
|
|
48
|
+
"id",
|
|
49
|
+
{ kind: "Literal", value: 1 },
|
|
50
|
+
],
|
|
51
|
+
],
|
|
52
|
+
condition: null,
|
|
53
|
+
isUpdatable: false,
|
|
54
|
+
selections: [
|
|
55
|
+
{
|
|
56
|
+
kind: "Link",
|
|
57
|
+
alias: "link",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "Linked",
|
|
61
|
+
fieldName: "asEconomist",
|
|
62
|
+
alias: null,
|
|
63
|
+
arguments: null,
|
|
64
|
+
condition: Node__asEconomist__resolver_reader,
|
|
65
|
+
isUpdatable: false,
|
|
66
|
+
selections: [
|
|
67
|
+
{
|
|
68
|
+
kind: "Scalar",
|
|
69
|
+
fieldName: "name",
|
|
70
|
+
alias: null,
|
|
71
|
+
arguments: null,
|
|
72
|
+
isUpdatable: false,
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
refetchQueryIndex: null,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
refetchQueryIndex: null,
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
const artifact: EagerReaderArtifact<
|
|
83
|
+
Query__linkedUpdate__param,
|
|
84
|
+
Query__linkedUpdate__output_type
|
|
85
|
+
> = {
|
|
86
|
+
kind: "EagerReaderArtifact",
|
|
87
|
+
fieldName: "Query.linkedUpdate",
|
|
88
|
+
resolver,
|
|
89
|
+
readerAst,
|
|
90
|
+
hasUpdatable: true,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default artifact;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {IsographEntrypoint, NormalizationAst, RefetchQueryNormalizationArtifactWrapper} from '@isograph/react';
|
|
2
|
+
import {Query__startUpdate__param} from './param_type';
|
|
3
|
+
import {Query__startUpdate__output_type} from './output_type';
|
|
4
|
+
import readerResolver from './resolver_reader';
|
|
5
|
+
import queryText from './query_text';
|
|
6
|
+
import normalizationAst from './normalization_ast';
|
|
7
|
+
const nestedRefetchQueries: RefetchQueryNormalizationArtifactWrapper[] = [];
|
|
8
|
+
|
|
9
|
+
const artifact: IsographEntrypoint<
|
|
10
|
+
Query__startUpdate__param,
|
|
11
|
+
Query__startUpdate__output_type,
|
|
12
|
+
NormalizationAst
|
|
13
|
+
> = {
|
|
14
|
+
kind: "Entrypoint",
|
|
15
|
+
networkRequestInfo: {
|
|
16
|
+
kind: "NetworkRequestInfo",
|
|
17
|
+
operation: {
|
|
18
|
+
kind: "Operation",
|
|
19
|
+
text: queryText,
|
|
20
|
+
},
|
|
21
|
+
normalizationAst,
|
|
22
|
+
},
|
|
23
|
+
concreteType: "Query",
|
|
24
|
+
readerWithRefetchQueries: {
|
|
25
|
+
kind: "ReaderWithRefetchQueries",
|
|
26
|
+
nestedRefetchQueries,
|
|
27
|
+
readerArtifact: readerResolver,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default artifact;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type {NormalizationAst} from '@isograph/react';
|
|
2
|
+
const normalizationAst: NormalizationAst = {
|
|
3
|
+
kind: "NormalizationAst",
|
|
4
|
+
selections: [
|
|
5
|
+
{
|
|
6
|
+
kind: "Linked",
|
|
7
|
+
fieldName: "node",
|
|
8
|
+
arguments: [
|
|
9
|
+
[
|
|
10
|
+
"id",
|
|
11
|
+
{ kind: "Variable", name: "id" },
|
|
12
|
+
],
|
|
13
|
+
],
|
|
14
|
+
concreteType: null,
|
|
15
|
+
selections: [
|
|
16
|
+
{
|
|
17
|
+
kind: "Scalar",
|
|
18
|
+
fieldName: "__typename",
|
|
19
|
+
arguments: null,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
kind: "Scalar",
|
|
23
|
+
fieldName: "id",
|
|
24
|
+
arguments: null,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
kind: "InlineFragment",
|
|
28
|
+
type: "Economist",
|
|
29
|
+
selections: [
|
|
30
|
+
{
|
|
31
|
+
kind: "Scalar",
|
|
32
|
+
fieldName: "__typename",
|
|
33
|
+
arguments: null,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
kind: "Scalar",
|
|
37
|
+
fieldName: "id",
|
|
38
|
+
arguments: null,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
kind: "Scalar",
|
|
42
|
+
fieldName: "name",
|
|
43
|
+
arguments: null,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
export default normalizationAst;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StartUpdate } from '@isograph/react';
|
|
2
|
+
import type { Query__startUpdate__parameters } from './parameters_type';
|
|
3
|
+
|
|
4
|
+
export type Query__startUpdate__param = {
|
|
5
|
+
readonly data: {
|
|
6
|
+
readonly node: ({
|
|
7
|
+
/**
|
|
8
|
+
A client pointer for the Economist type.
|
|
9
|
+
*/
|
|
10
|
+
readonly asEconomist: ({
|
|
11
|
+
readonly name: string,
|
|
12
|
+
} | null),
|
|
13
|
+
} | null),
|
|
14
|
+
},
|
|
15
|
+
readonly parameters: Query__startUpdate__parameters,
|
|
16
|
+
readonly startUpdate: StartUpdate<{
|
|
17
|
+
readonly node: ({
|
|
18
|
+
/**
|
|
19
|
+
A client pointer for the Economist type.
|
|
20
|
+
*/
|
|
21
|
+
readonly asEconomist: ({
|
|
22
|
+
name: string,
|
|
23
|
+
} | null),
|
|
24
|
+
} | null),
|
|
25
|
+
}>,
|
|
26
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { EagerReaderArtifact, ReaderAst } from '@isograph/react';
|
|
2
|
+
import { Query__startUpdate__param } from './param_type';
|
|
3
|
+
import { Query__startUpdate__output_type } from './output_type';
|
|
4
|
+
import { startUpdate as resolver } from '../../../startUpdate.test';
|
|
5
|
+
import Node__asEconomist__resolver_reader from '../../Node/asEconomist/resolver_reader';
|
|
6
|
+
|
|
7
|
+
const readerAst: ReaderAst<Query__startUpdate__param> = [
|
|
8
|
+
{
|
|
9
|
+
kind: "Linked",
|
|
10
|
+
fieldName: "node",
|
|
11
|
+
alias: null,
|
|
12
|
+
arguments: [
|
|
13
|
+
[
|
|
14
|
+
"id",
|
|
15
|
+
{ kind: "Variable", name: "id" },
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
condition: null,
|
|
19
|
+
isUpdatable: false,
|
|
20
|
+
selections: [
|
|
21
|
+
{
|
|
22
|
+
kind: "Linked",
|
|
23
|
+
fieldName: "asEconomist",
|
|
24
|
+
alias: null,
|
|
25
|
+
arguments: null,
|
|
26
|
+
condition: Node__asEconomist__resolver_reader,
|
|
27
|
+
isUpdatable: false,
|
|
28
|
+
selections: [
|
|
29
|
+
{
|
|
30
|
+
kind: "Scalar",
|
|
31
|
+
fieldName: "name",
|
|
32
|
+
alias: null,
|
|
33
|
+
arguments: null,
|
|
34
|
+
isUpdatable: true,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
refetchQueryIndex: null,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
refetchQueryIndex: null,
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const artifact: EagerReaderArtifact<
|
|
45
|
+
Query__startUpdate__param,
|
|
46
|
+
Query__startUpdate__output_type
|
|
47
|
+
> = {
|
|
48
|
+
kind: "EagerReaderArtifact",
|
|
49
|
+
fieldName: "Query.startUpdate",
|
|
50
|
+
resolver,
|
|
51
|
+
readerAst,
|
|
52
|
+
hasUpdatable: true,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default artifact;
|