@isograph/react 0.3.1 → 0.4.0
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 +14 -9
- 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 +46 -28
- 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 +1 -1
- 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/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/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 +19 -9
- 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 +50 -43
- package/src/core/check.ts +4 -4
- package/src/core/componentCache.ts +5 -1
- 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/index.ts +11 -3
- package/src/loadable-hooks/useConnectionSpecPagination.ts +1 -0
- 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
|
@@ -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;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import type { IsographEntrypoint } from '@isograph/react';
|
|
2
|
+
import { type Query__linkedUpdate__param } from './Query/linkedUpdate/param_type';
|
|
2
3
|
import { type Query__meNameSuccessor__param } from './Query/meNameSuccessor/param_type';
|
|
3
4
|
import { type Query__meName__param } from './Query/meName/param_type';
|
|
4
5
|
import { type Query__nodeField__param } from './Query/nodeField/param_type';
|
|
6
|
+
import { type Query__startUpdate__param } from './Query/startUpdate/param_type';
|
|
5
7
|
import { type Query__subquery__param } from './Query/subquery/param_type';
|
|
8
|
+
import entrypoint_Query__linkedUpdate from '../__isograph/Query/linkedUpdate/entrypoint';
|
|
6
9
|
import entrypoint_Query__meNameSuccessor from '../__isograph/Query/meNameSuccessor/entrypoint';
|
|
7
10
|
import entrypoint_Query__meName from '../__isograph/Query/meName/entrypoint';
|
|
8
11
|
import entrypoint_Query__nodeField from '../__isograph/Query/nodeField/entrypoint';
|
|
12
|
+
import entrypoint_Query__startUpdate from '../__isograph/Query/startUpdate/entrypoint';
|
|
9
13
|
import entrypoint_Query__subquery from '../__isograph/Query/subquery/entrypoint';
|
|
10
14
|
|
|
11
15
|
// This is the type given to regular client fields.
|
|
12
16
|
// This means that the type of the exported iso literal is exactly
|
|
13
17
|
// the type of the passed-in function, which takes one parameter
|
|
14
18
|
// of type TParam.
|
|
15
|
-
type IdentityWithParam<TParam extends object> = <TClientFieldReturn>(
|
|
19
|
+
type IdentityWithParam<TParam extends object, TReturnConstraint = unknown> = <TClientFieldReturn extends TReturnConstraint>(
|
|
16
20
|
clientField: (param: TParam) => TClientFieldReturn
|
|
17
21
|
) => (param: TParam) => TClientFieldReturn;
|
|
18
22
|
|
|
@@ -56,6 +60,10 @@ type MatchesWhitespaceAndString<
|
|
|
56
60
|
T
|
|
57
61
|
> = Whitespace<T> extends `${TString}${string}` ? T : never;
|
|
58
62
|
|
|
63
|
+
export function iso<T>(
|
|
64
|
+
param: T & MatchesWhitespaceAndString<'field Query.linkedUpdate', T>
|
|
65
|
+
): IdentityWithParam<Query__linkedUpdate__param>;
|
|
66
|
+
|
|
59
67
|
export function iso<T>(
|
|
60
68
|
param: T & MatchesWhitespaceAndString<'field Query.meNameSuccessor', T>
|
|
61
69
|
): IdentityWithParam<Query__meNameSuccessor__param>;
|
|
@@ -68,10 +76,18 @@ export function iso<T>(
|
|
|
68
76
|
param: T & MatchesWhitespaceAndString<'field Query.nodeField', T>
|
|
69
77
|
): IdentityWithParam<Query__nodeField__param>;
|
|
70
78
|
|
|
79
|
+
export function iso<T>(
|
|
80
|
+
param: T & MatchesWhitespaceAndString<'field Query.startUpdate', T>
|
|
81
|
+
): IdentityWithParam<Query__startUpdate__param>;
|
|
82
|
+
|
|
71
83
|
export function iso<T>(
|
|
72
84
|
param: T & MatchesWhitespaceAndString<'field Query.subquery', T>
|
|
73
85
|
): IdentityWithParam<Query__subquery__param>;
|
|
74
86
|
|
|
87
|
+
export function iso<T>(
|
|
88
|
+
param: T & MatchesWhitespaceAndString<'entrypoint Query.linkedUpdate', T>
|
|
89
|
+
): typeof entrypoint_Query__linkedUpdate;
|
|
90
|
+
|
|
75
91
|
export function iso<T>(
|
|
76
92
|
param: T & MatchesWhitespaceAndString<'entrypoint Query.meNameSuccessor', T>
|
|
77
93
|
): typeof entrypoint_Query__meNameSuccessor;
|
|
@@ -84,6 +100,10 @@ export function iso<T>(
|
|
|
84
100
|
param: T & MatchesWhitespaceAndString<'entrypoint Query.nodeField', T>
|
|
85
101
|
): typeof entrypoint_Query__nodeField;
|
|
86
102
|
|
|
103
|
+
export function iso<T>(
|
|
104
|
+
param: T & MatchesWhitespaceAndString<'entrypoint Query.startUpdate', T>
|
|
105
|
+
): typeof entrypoint_Query__startUpdate;
|
|
106
|
+
|
|
87
107
|
export function iso<T>(
|
|
88
108
|
param: T & MatchesWhitespaceAndString<'entrypoint Query.subquery', T>
|
|
89
109
|
): typeof entrypoint_Query__subquery;
|