houdini 1.0.0-next.3 → 1.0.0-next.4
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/build/cmd-cjs/index.js +39 -43
- package/build/cmd-esm/index.js +39 -43
- package/build/codegen/generators/artifacts/selection.d.ts +3 -3
- package/build/codegen-cjs/index.js +37 -41
- package/build/codegen-esm/index.js +37 -41
- package/build/runtime/cache/cache.d.ts +3 -3
- package/build/runtime/client/documentStore.d.ts +1 -1
- package/build/runtime/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime/lib/types.d.ts +2 -3
- package/build/runtime-cjs/cache/cache.d.ts +3 -3
- package/build/runtime-cjs/cache/cache.js +30 -15
- package/build/runtime-cjs/cache/lists.js +3 -3
- package/build/runtime-cjs/client/documentStore.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/fetchParams.js +6 -1
- package/build/runtime-cjs/client/plugins/query.js +0 -1
- package/build/runtime-cjs/lib/types.d.ts +2 -3
- package/build/runtime-esm/cache/cache.d.ts +3 -3
- package/build/runtime-esm/cache/cache.js +30 -15
- package/build/runtime-esm/cache/lists.js +3 -3
- package/build/runtime-esm/client/documentStore.d.ts +1 -1
- package/build/runtime-esm/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime-esm/client/plugins/fetchParams.js +6 -1
- package/build/runtime-esm/client/plugins/query.js +0 -1
- package/build/runtime-esm/lib/types.d.ts +2 -3
- package/build/test-cjs/index.js +37 -41
- package/build/test-esm/index.js +37 -41
- package/build/vite-cjs/index.js +37 -41
- package/build/vite-esm/index.js +37 -41
- package/package.json +1 -1
package/build/test-esm/index.js
CHANGED
|
@@ -56024,19 +56024,18 @@ async function paginate(config2, documents) {
|
|
|
56024
56024
|
paginated = true;
|
|
56025
56025
|
const fieldTypeFields = parentTypeFromAncestors(config2.schema, doc.filename, ancestors).getFields()[node.name.value];
|
|
56026
56026
|
const args = new Set(fieldTypeFields.args.map((arg) => arg.name));
|
|
56027
|
-
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
56028
|
-
const specifiedForwards = passedArgs.has("first");
|
|
56029
|
-
const specifiedBackwards = passedArgs.has("last");
|
|
56030
56027
|
cursorType = fieldTypeFields.args?.find((arg) => ["before", "after"].includes(arg.name))?.type?.name || "String";
|
|
56031
56028
|
flags.after.type = cursorType;
|
|
56032
56029
|
flags.before.type = cursorType;
|
|
56033
|
-
const
|
|
56034
|
-
const
|
|
56035
|
-
const
|
|
56036
|
-
|
|
56037
|
-
|
|
56038
|
-
flags.
|
|
56039
|
-
flags.
|
|
56030
|
+
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
56031
|
+
const forwards = args.has("first") && args.has("after");
|
|
56032
|
+
const backwards = args.has("last") && args.has("after");
|
|
56033
|
+
const cursorPagination = passedArgs.has("last") || passedArgs.has("first");
|
|
56034
|
+
const offsetPagination = !cursorPagination && args.has("offset") && args.has("limit");
|
|
56035
|
+
flags.first.enabled = forwards;
|
|
56036
|
+
flags.after.enabled = forwards;
|
|
56037
|
+
flags.last.enabled = backwards;
|
|
56038
|
+
flags.before.enabled = backwards;
|
|
56040
56039
|
flags.offset.enabled = offsetPagination;
|
|
56041
56040
|
flags.limit.enabled = offsetPagination;
|
|
56042
56041
|
paginationPath = ancestors.filter(
|
|
@@ -56056,10 +56055,6 @@ async function paginate(config2, documents) {
|
|
|
56056
56055
|
let fragmentName = "";
|
|
56057
56056
|
let refetchQueryName = "";
|
|
56058
56057
|
let nodeQuery = false;
|
|
56059
|
-
let refetchUpdate = "append" /* append */;
|
|
56060
|
-
if (flags.last.enabled) {
|
|
56061
|
-
refetchUpdate = "prepend" /* prepend */;
|
|
56062
|
-
}
|
|
56063
56058
|
let fragment = "";
|
|
56064
56059
|
doc.document = graphql8.visit(doc.document, {
|
|
56065
56060
|
OperationDefinition(node) {
|
|
@@ -56154,26 +56149,24 @@ async function paginate(config2, documents) {
|
|
|
56154
56149
|
targetType = fragment;
|
|
56155
56150
|
}
|
|
56156
56151
|
}
|
|
56152
|
+
const pageSize = flags.first.defaultValue ?? flags.last.defaultValue ?? flags.limit.defaultValue;
|
|
56153
|
+
const start = flags.after.defaultValue ?? flags.before.defaultValue ?? flags.offset.defaultValue;
|
|
56154
|
+
let direction = "forward";
|
|
56155
|
+
if (flags.before.enabled && flags.after.enabled) {
|
|
56156
|
+
direction = "both";
|
|
56157
|
+
} else if (flags.before.enabled) {
|
|
56158
|
+
direction = "backward";
|
|
56159
|
+
}
|
|
56157
56160
|
doc.refetch = {
|
|
56158
|
-
update: refetchUpdate,
|
|
56159
56161
|
path: paginationPath,
|
|
56160
56162
|
method: flags.first.enabled || flags.last.enabled ? "cursor" : "offset",
|
|
56161
|
-
pageSize
|
|
56163
|
+
pageSize,
|
|
56162
56164
|
embedded: nodeQuery,
|
|
56163
56165
|
targetType,
|
|
56164
56166
|
paginated: true,
|
|
56165
|
-
direction
|
|
56166
|
-
|
|
56167
|
-
|
|
56168
|
-
doc.refetch.pageSize = flags.first.defaultValue;
|
|
56169
|
-
doc.refetch.start = flags.after.defaultValue;
|
|
56170
|
-
} else if (flags.last.enabled) {
|
|
56171
|
-
doc.refetch.pageSize = flags.last.defaultValue;
|
|
56172
|
-
doc.refetch.start = flags.before.defaultValue;
|
|
56173
|
-
} else if (flags.limit.enabled) {
|
|
56174
|
-
doc.refetch.pageSize = flags.limit.defaultValue;
|
|
56175
|
-
doc.refetch.start = flags.offset.defaultValue;
|
|
56176
|
-
}
|
|
56167
|
+
direction,
|
|
56168
|
+
start
|
|
56169
|
+
};
|
|
56177
56170
|
if (!fragment) {
|
|
56178
56171
|
continue;
|
|
56179
56172
|
}
|
|
@@ -56349,12 +56342,6 @@ function replaceArgumentsWithVariables(args, flags) {
|
|
|
56349
56342
|
if (flags[name2].defaultValue || !spec.enabled || seenArgs[name2]) {
|
|
56350
56343
|
continue;
|
|
56351
56344
|
}
|
|
56352
|
-
if (["first", "after"].includes(name2) && flags["before"].enabled) {
|
|
56353
|
-
continue;
|
|
56354
|
-
}
|
|
56355
|
-
if (["last", "before"].includes(name2) && flags["first"].enabled) {
|
|
56356
|
-
continue;
|
|
56357
|
-
}
|
|
56358
56345
|
newArgs.push(variableAsArgument(name2));
|
|
56359
56346
|
}
|
|
56360
56347
|
return newArgs;
|
|
@@ -56862,7 +56849,7 @@ function selection({
|
|
|
56862
56849
|
path: path2 = [],
|
|
56863
56850
|
includeFragments,
|
|
56864
56851
|
document,
|
|
56865
|
-
|
|
56852
|
+
inConnection
|
|
56866
56853
|
}) {
|
|
56867
56854
|
let object = {};
|
|
56868
56855
|
const typeMap = {};
|
|
@@ -57004,14 +56991,23 @@ function selection({
|
|
|
57004
56991
|
(directive) => directive.name.value === config2.paginateDirective
|
|
57005
56992
|
);
|
|
57006
56993
|
if (paginated && document.refetch && document.refetch.method === "offset") {
|
|
57007
|
-
fieldObj.
|
|
56994
|
+
fieldObj.updates = ["append" /* append */];
|
|
56995
|
+
}
|
|
56996
|
+
let continueConnection = inConnection;
|
|
56997
|
+
if ([
|
|
56998
|
+
"edges",
|
|
56999
|
+
"endCursor",
|
|
57000
|
+
"startCursor",
|
|
57001
|
+
"hasNextPage",
|
|
57002
|
+
"hasPreviousPage"
|
|
57003
|
+
].includes(attributeName) && inConnection && document.refetch) {
|
|
57004
|
+
fieldObj.updates = ["append" /* append */, "prepend" /* prepend */];
|
|
57008
57005
|
}
|
|
57009
|
-
if (attributeName === "
|
|
57010
|
-
|
|
57011
|
-
markEdges = "";
|
|
57006
|
+
if (attributeName === "node" && inConnection) {
|
|
57007
|
+
continueConnection = false;
|
|
57012
57008
|
}
|
|
57013
57009
|
if (field.selectionSet) {
|
|
57014
|
-
const
|
|
57010
|
+
const connectionState = paginated && document.refetch?.method === "cursor" || continueConnection;
|
|
57015
57011
|
fieldObj.selection = selection({
|
|
57016
57012
|
config: config2,
|
|
57017
57013
|
filepath,
|
|
@@ -57021,7 +57017,7 @@ function selection({
|
|
|
57021
57017
|
path: pathSoFar,
|
|
57022
57018
|
includeFragments,
|
|
57023
57019
|
document,
|
|
57024
|
-
|
|
57020
|
+
inConnection: connectionState
|
|
57025
57021
|
});
|
|
57026
57022
|
}
|
|
57027
57023
|
if (field.arguments?.length && fieldObj.list) {
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -68763,19 +68763,18 @@ async function paginate(config4, documents) {
|
|
|
68763
68763
|
paginated = true;
|
|
68764
68764
|
const fieldTypeFields = parentTypeFromAncestors(config4.schema, doc.filename, ancestors).getFields()[node.name.value];
|
|
68765
68765
|
const args = new Set(fieldTypeFields.args.map((arg) => arg.name));
|
|
68766
|
-
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
68767
|
-
const specifiedForwards = passedArgs.has("first");
|
|
68768
|
-
const specifiedBackwards = passedArgs.has("last");
|
|
68769
68766
|
cursorType = fieldTypeFields.args?.find((arg) => ["before", "after"].includes(arg.name))?.type?.name || "String";
|
|
68770
68767
|
flags.after.type = cursorType;
|
|
68771
68768
|
flags.before.type = cursorType;
|
|
68772
|
-
const
|
|
68773
|
-
const
|
|
68774
|
-
const
|
|
68775
|
-
|
|
68776
|
-
|
|
68777
|
-
flags.
|
|
68778
|
-
flags.
|
|
68769
|
+
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
68770
|
+
const forwards = args.has("first") && args.has("after");
|
|
68771
|
+
const backwards = args.has("last") && args.has("after");
|
|
68772
|
+
const cursorPagination = passedArgs.has("last") || passedArgs.has("first");
|
|
68773
|
+
const offsetPagination = !cursorPagination && args.has("offset") && args.has("limit");
|
|
68774
|
+
flags.first.enabled = forwards;
|
|
68775
|
+
flags.after.enabled = forwards;
|
|
68776
|
+
flags.last.enabled = backwards;
|
|
68777
|
+
flags.before.enabled = backwards;
|
|
68779
68778
|
flags.offset.enabled = offsetPagination;
|
|
68780
68779
|
flags.limit.enabled = offsetPagination;
|
|
68781
68780
|
paginationPath = ancestors.filter(
|
|
@@ -68795,10 +68794,6 @@ async function paginate(config4, documents) {
|
|
|
68795
68794
|
let fragmentName = "";
|
|
68796
68795
|
let refetchQueryName = "";
|
|
68797
68796
|
let nodeQuery = false;
|
|
68798
|
-
let refetchUpdate = "append" /* append */;
|
|
68799
|
-
if (flags.last.enabled) {
|
|
68800
|
-
refetchUpdate = "prepend" /* prepend */;
|
|
68801
|
-
}
|
|
68802
68797
|
let fragment = "";
|
|
68803
68798
|
doc.document = graphql10.visit(doc.document, {
|
|
68804
68799
|
OperationDefinition(node) {
|
|
@@ -68893,26 +68888,24 @@ async function paginate(config4, documents) {
|
|
|
68893
68888
|
targetType = fragment;
|
|
68894
68889
|
}
|
|
68895
68890
|
}
|
|
68891
|
+
const pageSize = flags.first.defaultValue ?? flags.last.defaultValue ?? flags.limit.defaultValue;
|
|
68892
|
+
const start = flags.after.defaultValue ?? flags.before.defaultValue ?? flags.offset.defaultValue;
|
|
68893
|
+
let direction = "forward";
|
|
68894
|
+
if (flags.before.enabled && flags.after.enabled) {
|
|
68895
|
+
direction = "both";
|
|
68896
|
+
} else if (flags.before.enabled) {
|
|
68897
|
+
direction = "backward";
|
|
68898
|
+
}
|
|
68896
68899
|
doc.refetch = {
|
|
68897
|
-
update: refetchUpdate,
|
|
68898
68900
|
path: paginationPath,
|
|
68899
68901
|
method: flags.first.enabled || flags.last.enabled ? "cursor" : "offset",
|
|
68900
|
-
pageSize
|
|
68902
|
+
pageSize,
|
|
68901
68903
|
embedded: nodeQuery,
|
|
68902
68904
|
targetType,
|
|
68903
68905
|
paginated: true,
|
|
68904
|
-
direction
|
|
68905
|
-
|
|
68906
|
-
|
|
68907
|
-
doc.refetch.pageSize = flags.first.defaultValue;
|
|
68908
|
-
doc.refetch.start = flags.after.defaultValue;
|
|
68909
|
-
} else if (flags.last.enabled) {
|
|
68910
|
-
doc.refetch.pageSize = flags.last.defaultValue;
|
|
68911
|
-
doc.refetch.start = flags.before.defaultValue;
|
|
68912
|
-
} else if (flags.limit.enabled) {
|
|
68913
|
-
doc.refetch.pageSize = flags.limit.defaultValue;
|
|
68914
|
-
doc.refetch.start = flags.offset.defaultValue;
|
|
68915
|
-
}
|
|
68906
|
+
direction,
|
|
68907
|
+
start
|
|
68908
|
+
};
|
|
68916
68909
|
if (!fragment) {
|
|
68917
68910
|
continue;
|
|
68918
68911
|
}
|
|
@@ -69088,12 +69081,6 @@ function replaceArgumentsWithVariables(args, flags) {
|
|
|
69088
69081
|
if (flags[name2].defaultValue || !spec.enabled || seenArgs[name2]) {
|
|
69089
69082
|
continue;
|
|
69090
69083
|
}
|
|
69091
|
-
if (["first", "after"].includes(name2) && flags["before"].enabled) {
|
|
69092
|
-
continue;
|
|
69093
|
-
}
|
|
69094
|
-
if (["last", "before"].includes(name2) && flags["first"].enabled) {
|
|
69095
|
-
continue;
|
|
69096
|
-
}
|
|
69097
69084
|
newArgs.push(variableAsArgument(name2));
|
|
69098
69085
|
}
|
|
69099
69086
|
return newArgs;
|
|
@@ -69601,7 +69588,7 @@ function selection({
|
|
|
69601
69588
|
path: path2 = [],
|
|
69602
69589
|
includeFragments,
|
|
69603
69590
|
document,
|
|
69604
|
-
|
|
69591
|
+
inConnection
|
|
69605
69592
|
}) {
|
|
69606
69593
|
let object = {};
|
|
69607
69594
|
const typeMap = {};
|
|
@@ -69743,14 +69730,23 @@ function selection({
|
|
|
69743
69730
|
(directive) => directive.name.value === config4.paginateDirective
|
|
69744
69731
|
);
|
|
69745
69732
|
if (paginated && document.refetch && document.refetch.method === "offset") {
|
|
69746
|
-
fieldObj.
|
|
69733
|
+
fieldObj.updates = ["append" /* append */];
|
|
69734
|
+
}
|
|
69735
|
+
let continueConnection = inConnection;
|
|
69736
|
+
if ([
|
|
69737
|
+
"edges",
|
|
69738
|
+
"endCursor",
|
|
69739
|
+
"startCursor",
|
|
69740
|
+
"hasNextPage",
|
|
69741
|
+
"hasPreviousPage"
|
|
69742
|
+
].includes(attributeName) && inConnection && document.refetch) {
|
|
69743
|
+
fieldObj.updates = ["append" /* append */, "prepend" /* prepend */];
|
|
69747
69744
|
}
|
|
69748
|
-
if (attributeName === "
|
|
69749
|
-
|
|
69750
|
-
markEdges = "";
|
|
69745
|
+
if (attributeName === "node" && inConnection) {
|
|
69746
|
+
continueConnection = false;
|
|
69751
69747
|
}
|
|
69752
69748
|
if (field.selectionSet) {
|
|
69753
|
-
const
|
|
69749
|
+
const connectionState = paginated && document.refetch?.method === "cursor" || continueConnection;
|
|
69754
69750
|
fieldObj.selection = selection({
|
|
69755
69751
|
config: config4,
|
|
69756
69752
|
filepath,
|
|
@@ -69760,7 +69756,7 @@ function selection({
|
|
|
69760
69756
|
path: pathSoFar,
|
|
69761
69757
|
includeFragments,
|
|
69762
69758
|
document,
|
|
69763
|
-
|
|
69759
|
+
inConnection: connectionState
|
|
69764
69760
|
});
|
|
69765
69761
|
}
|
|
69766
69762
|
if (field.arguments?.length && fieldObj.list) {
|
package/build/vite-esm/index.js
CHANGED
|
@@ -68757,19 +68757,18 @@ async function paginate(config4, documents) {
|
|
|
68757
68757
|
paginated = true;
|
|
68758
68758
|
const fieldTypeFields = parentTypeFromAncestors(config4.schema, doc.filename, ancestors).getFields()[node.name.value];
|
|
68759
68759
|
const args = new Set(fieldTypeFields.args.map((arg) => arg.name));
|
|
68760
|
-
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
68761
|
-
const specifiedForwards = passedArgs.has("first");
|
|
68762
|
-
const specifiedBackwards = passedArgs.has("last");
|
|
68763
68760
|
cursorType = fieldTypeFields.args?.find((arg) => ["before", "after"].includes(arg.name))?.type?.name || "String";
|
|
68764
68761
|
flags.after.type = cursorType;
|
|
68765
68762
|
flags.before.type = cursorType;
|
|
68766
|
-
const
|
|
68767
|
-
const
|
|
68768
|
-
const
|
|
68769
|
-
|
|
68770
|
-
|
|
68771
|
-
flags.
|
|
68772
|
-
flags.
|
|
68763
|
+
const passedArgs = new Set(node.arguments?.map((arg) => arg.name.value));
|
|
68764
|
+
const forwards = args.has("first") && args.has("after");
|
|
68765
|
+
const backwards = args.has("last") && args.has("after");
|
|
68766
|
+
const cursorPagination = passedArgs.has("last") || passedArgs.has("first");
|
|
68767
|
+
const offsetPagination = !cursorPagination && args.has("offset") && args.has("limit");
|
|
68768
|
+
flags.first.enabled = forwards;
|
|
68769
|
+
flags.after.enabled = forwards;
|
|
68770
|
+
flags.last.enabled = backwards;
|
|
68771
|
+
flags.before.enabled = backwards;
|
|
68773
68772
|
flags.offset.enabled = offsetPagination;
|
|
68774
68773
|
flags.limit.enabled = offsetPagination;
|
|
68775
68774
|
paginationPath = ancestors.filter(
|
|
@@ -68789,10 +68788,6 @@ async function paginate(config4, documents) {
|
|
|
68789
68788
|
let fragmentName = "";
|
|
68790
68789
|
let refetchQueryName = "";
|
|
68791
68790
|
let nodeQuery = false;
|
|
68792
|
-
let refetchUpdate = "append" /* append */;
|
|
68793
|
-
if (flags.last.enabled) {
|
|
68794
|
-
refetchUpdate = "prepend" /* prepend */;
|
|
68795
|
-
}
|
|
68796
68791
|
let fragment = "";
|
|
68797
68792
|
doc.document = graphql10.visit(doc.document, {
|
|
68798
68793
|
OperationDefinition(node) {
|
|
@@ -68887,26 +68882,24 @@ async function paginate(config4, documents) {
|
|
|
68887
68882
|
targetType = fragment;
|
|
68888
68883
|
}
|
|
68889
68884
|
}
|
|
68885
|
+
const pageSize = flags.first.defaultValue ?? flags.last.defaultValue ?? flags.limit.defaultValue;
|
|
68886
|
+
const start = flags.after.defaultValue ?? flags.before.defaultValue ?? flags.offset.defaultValue;
|
|
68887
|
+
let direction = "forward";
|
|
68888
|
+
if (flags.before.enabled && flags.after.enabled) {
|
|
68889
|
+
direction = "both";
|
|
68890
|
+
} else if (flags.before.enabled) {
|
|
68891
|
+
direction = "backward";
|
|
68892
|
+
}
|
|
68890
68893
|
doc.refetch = {
|
|
68891
|
-
update: refetchUpdate,
|
|
68892
68894
|
path: paginationPath,
|
|
68893
68895
|
method: flags.first.enabled || flags.last.enabled ? "cursor" : "offset",
|
|
68894
|
-
pageSize
|
|
68896
|
+
pageSize,
|
|
68895
68897
|
embedded: nodeQuery,
|
|
68896
68898
|
targetType,
|
|
68897
68899
|
paginated: true,
|
|
68898
|
-
direction
|
|
68899
|
-
|
|
68900
|
-
|
|
68901
|
-
doc.refetch.pageSize = flags.first.defaultValue;
|
|
68902
|
-
doc.refetch.start = flags.after.defaultValue;
|
|
68903
|
-
} else if (flags.last.enabled) {
|
|
68904
|
-
doc.refetch.pageSize = flags.last.defaultValue;
|
|
68905
|
-
doc.refetch.start = flags.before.defaultValue;
|
|
68906
|
-
} else if (flags.limit.enabled) {
|
|
68907
|
-
doc.refetch.pageSize = flags.limit.defaultValue;
|
|
68908
|
-
doc.refetch.start = flags.offset.defaultValue;
|
|
68909
|
-
}
|
|
68900
|
+
direction,
|
|
68901
|
+
start
|
|
68902
|
+
};
|
|
68910
68903
|
if (!fragment) {
|
|
68911
68904
|
continue;
|
|
68912
68905
|
}
|
|
@@ -69082,12 +69075,6 @@ function replaceArgumentsWithVariables(args, flags) {
|
|
|
69082
69075
|
if (flags[name2].defaultValue || !spec.enabled || seenArgs[name2]) {
|
|
69083
69076
|
continue;
|
|
69084
69077
|
}
|
|
69085
|
-
if (["first", "after"].includes(name2) && flags["before"].enabled) {
|
|
69086
|
-
continue;
|
|
69087
|
-
}
|
|
69088
|
-
if (["last", "before"].includes(name2) && flags["first"].enabled) {
|
|
69089
|
-
continue;
|
|
69090
|
-
}
|
|
69091
69078
|
newArgs.push(variableAsArgument(name2));
|
|
69092
69079
|
}
|
|
69093
69080
|
return newArgs;
|
|
@@ -69595,7 +69582,7 @@ function selection({
|
|
|
69595
69582
|
path: path2 = [],
|
|
69596
69583
|
includeFragments,
|
|
69597
69584
|
document,
|
|
69598
|
-
|
|
69585
|
+
inConnection
|
|
69599
69586
|
}) {
|
|
69600
69587
|
let object = {};
|
|
69601
69588
|
const typeMap = {};
|
|
@@ -69737,14 +69724,23 @@ function selection({
|
|
|
69737
69724
|
(directive) => directive.name.value === config4.paginateDirective
|
|
69738
69725
|
);
|
|
69739
69726
|
if (paginated && document.refetch && document.refetch.method === "offset") {
|
|
69740
|
-
fieldObj.
|
|
69727
|
+
fieldObj.updates = ["append" /* append */];
|
|
69728
|
+
}
|
|
69729
|
+
let continueConnection = inConnection;
|
|
69730
|
+
if ([
|
|
69731
|
+
"edges",
|
|
69732
|
+
"endCursor",
|
|
69733
|
+
"startCursor",
|
|
69734
|
+
"hasNextPage",
|
|
69735
|
+
"hasPreviousPage"
|
|
69736
|
+
].includes(attributeName) && inConnection && document.refetch) {
|
|
69737
|
+
fieldObj.updates = ["append" /* append */, "prepend" /* prepend */];
|
|
69741
69738
|
}
|
|
69742
|
-
if (attributeName === "
|
|
69743
|
-
|
|
69744
|
-
markEdges = "";
|
|
69739
|
+
if (attributeName === "node" && inConnection) {
|
|
69740
|
+
continueConnection = false;
|
|
69745
69741
|
}
|
|
69746
69742
|
if (field.selectionSet) {
|
|
69747
|
-
const
|
|
69743
|
+
const connectionState = paginated && document.refetch?.method === "cursor" || continueConnection;
|
|
69748
69744
|
fieldObj.selection = selection({
|
|
69749
69745
|
config: config4,
|
|
69750
69746
|
filepath,
|
|
@@ -69754,7 +69750,7 @@ function selection({
|
|
|
69754
69750
|
path: pathSoFar,
|
|
69755
69751
|
includeFragments,
|
|
69756
69752
|
document,
|
|
69757
|
-
|
|
69753
|
+
inConnection: connectionState
|
|
69758
69754
|
});
|
|
69759
69755
|
}
|
|
69760
69756
|
if (field.arguments?.length && fieldObj.list) {
|