houdini-svelte 1.0.0-next.12 → 1.0.0-next.14
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/plugin-cjs/index.js +1 -1
- package/build/plugin-esm/index.js +1 -1
- package/build/runtime/stores/pagination/cursor.d.ts +2 -1
- package/build/runtime/stores/pagination/offset.d.ts +2 -1
- package/build/runtime-cjs/stores/pagination/cursor.d.ts +2 -1
- package/build/runtime-cjs/stores/pagination/cursor.js +3 -1
- package/build/runtime-cjs/stores/pagination/offset.d.ts +2 -1
- package/build/runtime-cjs/stores/pagination/offset.js +3 -1
- package/build/runtime-esm/stores/pagination/cursor.d.ts +2 -1
- package/build/runtime-esm/stores/pagination/cursor.js +3 -1
- package/build/runtime-esm/stores/pagination/offset.d.ts +2 -1
- package/build/runtime-esm/stores/pagination/offset.js +3 -1
- package/build/test-cjs/index.js +8 -2
- package/build/test-esm/index.js +8 -2
- package/package.json +2 -2
|
@@ -181957,7 +181957,7 @@ import type { ${query.name}$input } from '${path_exports.relative(filepath, path
|
|
|
181957
181957
|
` + typeFile + `
|
|
181958
181958
|
export type ${config4.variableFunctionName(
|
|
181959
181959
|
query.name
|
|
181960
|
-
)} = <_Props
|
|
181960
|
+
)} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.name}$input
|
|
181961
181961
|
`;
|
|
181962
181962
|
}
|
|
181963
181963
|
}
|
|
@@ -181951,7 +181951,7 @@ import type { ${query.name}$input } from '${path_exports.relative(filepath, path
|
|
|
181951
181951
|
` + typeFile + `
|
|
181952
181952
|
export type ${config4.variableFunctionName(
|
|
181953
181953
|
query.name
|
|
181954
|
-
)} = <_Props
|
|
181954
|
+
)} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.name}$input
|
|
181955
181955
|
`;
|
|
181956
181956
|
}
|
|
181957
181957
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { Writable } from 'svelte/store';
|
|
4
5
|
import type { QueryStoreFetchParams } from '../query';
|
|
@@ -9,7 +10,7 @@ export declare function cursorHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
fetch: FetchFn<_Data, _Input>;
|
|
12
|
-
fetchUpdate: (arg:
|
|
13
|
+
fetchUpdate: (arg: SendParams, updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
|
|
13
14
|
}): CursorHandlers<_Data, _Input>;
|
|
14
15
|
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
15
16
|
loadNextPage: (args?: {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { QueryStoreFetchParams } from '../query';
|
|
4
5
|
import type { FetchFn } from './fetch';
|
|
5
6
|
export declare function offsetHandlers<_Data extends GraphQLObject, _Input extends {}>({ artifact, observer, fetch, fetchUpdate, storeName, }: {
|
|
6
7
|
artifact: QueryArtifact;
|
|
7
8
|
fetch: FetchFn<_Data, _Input>;
|
|
8
|
-
fetchUpdate: FetchFn<_Data, _Input
|
|
9
|
+
fetchUpdate: (arg: SendParams) => ReturnType<FetchFn<_Data, _Input>>;
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
}): {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { Writable } from 'svelte/store';
|
|
4
5
|
import type { QueryStoreFetchParams } from '../query';
|
|
@@ -9,7 +10,7 @@ export declare function cursorHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
fetch: FetchFn<_Data, _Input>;
|
|
12
|
-
fetchUpdate: (arg:
|
|
13
|
+
fetchUpdate: (arg: SendParams, updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
|
|
13
14
|
}): CursorHandlers<_Data, _Input>;
|
|
14
15
|
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
15
16
|
loadNextPage: (args?: {
|
|
@@ -26,6 +26,7 @@ var import_config = require("$houdini/runtime/lib/config");
|
|
|
26
26
|
var import_constants = require("$houdini/runtime/lib/constants");
|
|
27
27
|
var import_deepEquals = require("$houdini/runtime/lib/deepEquals");
|
|
28
28
|
var import_store = require("svelte/store");
|
|
29
|
+
var import_session = require("../../session");
|
|
29
30
|
var import_query = require("../query");
|
|
30
31
|
var import_pageInfo = require("./pageInfo");
|
|
31
32
|
function cursorHandlers({
|
|
@@ -58,7 +59,8 @@ function cursorHandlers({
|
|
|
58
59
|
variables: loadVariables,
|
|
59
60
|
fetch,
|
|
60
61
|
metadata,
|
|
61
|
-
policy: import_lib.CachePolicy.NetworkOnly
|
|
62
|
+
policy: import_lib.CachePolicy.NetworkOnly,
|
|
63
|
+
session: await (0, import_session.getSession)()
|
|
62
64
|
},
|
|
63
65
|
[where === "start" ? "prepend" : "append"]
|
|
64
66
|
);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { QueryStoreFetchParams } from '../query';
|
|
4
5
|
import type { FetchFn } from './fetch';
|
|
5
6
|
export declare function offsetHandlers<_Data extends GraphQLObject, _Input extends {}>({ artifact, observer, fetch, fetchUpdate, storeName, }: {
|
|
6
7
|
artifact: QueryArtifact;
|
|
7
8
|
fetch: FetchFn<_Data, _Input>;
|
|
8
|
-
fetchUpdate: FetchFn<_Data, _Input
|
|
9
|
+
fetchUpdate: (arg: SendParams) => ReturnType<FetchFn<_Data, _Input>>;
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
}): {
|
|
@@ -24,6 +24,7 @@ module.exports = __toCommonJS(offset_exports);
|
|
|
24
24
|
var import_lib = require("$houdini/runtime/lib");
|
|
25
25
|
var import_deepEquals = require("$houdini/runtime/lib/deepEquals");
|
|
26
26
|
var import_store = require("svelte/store");
|
|
27
|
+
var import_session = require("../../session");
|
|
27
28
|
var import_query = require("../query");
|
|
28
29
|
var import_pageInfo = require("./pageInfo");
|
|
29
30
|
function offsetHandlers({
|
|
@@ -57,7 +58,8 @@ function offsetHandlers({
|
|
|
57
58
|
variables: queryVariables,
|
|
58
59
|
fetch: fetch2,
|
|
59
60
|
metadata,
|
|
60
|
-
policy: import_lib.CachePolicy.NetworkOnly
|
|
61
|
+
policy: import_lib.CachePolicy.NetworkOnly,
|
|
62
|
+
session: await (0, import_session.getSession)()
|
|
61
63
|
});
|
|
62
64
|
const pageSize = queryVariables.limit || artifact.refetch.pageSize;
|
|
63
65
|
currentOffset = offset + pageSize;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { Writable } from 'svelte/store';
|
|
4
5
|
import type { QueryStoreFetchParams } from '../query';
|
|
@@ -9,7 +10,7 @@ export declare function cursorHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
fetch: FetchFn<_Data, _Input>;
|
|
12
|
-
fetchUpdate: (arg:
|
|
13
|
+
fetchUpdate: (arg: SendParams, updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
|
|
13
14
|
}): CursorHandlers<_Data, _Input>;
|
|
14
15
|
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
15
16
|
loadNextPage: (args?: {
|
|
@@ -3,6 +3,7 @@ import { getCurrentConfig } from "$houdini/runtime/lib/config";
|
|
|
3
3
|
import { siteURL } from "$houdini/runtime/lib/constants";
|
|
4
4
|
import { deepEquals } from "$houdini/runtime/lib/deepEquals";
|
|
5
5
|
import { get, writable } from "svelte/store";
|
|
6
|
+
import { getSession } from "../../session";
|
|
6
7
|
import { fetchParams } from "../query";
|
|
7
8
|
import { countPage, extractPageInfo, missingPageSizeError } from "./pageInfo";
|
|
8
9
|
function cursorHandlers({
|
|
@@ -35,7 +36,8 @@ function cursorHandlers({
|
|
|
35
36
|
variables: loadVariables,
|
|
36
37
|
fetch,
|
|
37
38
|
metadata,
|
|
38
|
-
policy: CachePolicy.NetworkOnly
|
|
39
|
+
policy: CachePolicy.NetworkOnly,
|
|
40
|
+
session: await getSession()
|
|
39
41
|
},
|
|
40
42
|
[where === "start" ? "prepend" : "append"]
|
|
41
43
|
);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
|
+
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
2
3
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
4
|
import type { QueryStoreFetchParams } from '../query';
|
|
4
5
|
import type { FetchFn } from './fetch';
|
|
5
6
|
export declare function offsetHandlers<_Data extends GraphQLObject, _Input extends {}>({ artifact, observer, fetch, fetchUpdate, storeName, }: {
|
|
6
7
|
artifact: QueryArtifact;
|
|
7
8
|
fetch: FetchFn<_Data, _Input>;
|
|
8
|
-
fetchUpdate: FetchFn<_Data, _Input
|
|
9
|
+
fetchUpdate: (arg: SendParams) => ReturnType<FetchFn<_Data, _Input>>;
|
|
9
10
|
storeName: string;
|
|
10
11
|
observer: DocumentStore<_Data, _Input>;
|
|
11
12
|
}): {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CachePolicy } from "$houdini/runtime/lib";
|
|
2
2
|
import { deepEquals } from "$houdini/runtime/lib/deepEquals";
|
|
3
3
|
import { get } from "svelte/store";
|
|
4
|
+
import { getSession } from "../../session";
|
|
4
5
|
import { fetchParams } from "../query";
|
|
5
6
|
import { countPage, missingPageSizeError } from "./pageInfo";
|
|
6
7
|
function offsetHandlers({
|
|
@@ -34,7 +35,8 @@ function offsetHandlers({
|
|
|
34
35
|
variables: queryVariables,
|
|
35
36
|
fetch: fetch2,
|
|
36
37
|
metadata,
|
|
37
|
-
policy: CachePolicy.NetworkOnly
|
|
38
|
+
policy: CachePolicy.NetworkOnly,
|
|
39
|
+
session: await getSession()
|
|
38
40
|
});
|
|
39
41
|
const pageSize = queryVariables.limit || artifact.refetch.pageSize;
|
|
40
42
|
currentOffset = offset + pageSize;
|
package/build/test-cjs/index.js
CHANGED
|
@@ -144739,7 +144739,13 @@ var FieldCollection = class {
|
|
|
144739
144739
|
if (fragment2.selection.size === 0) {
|
|
144740
144740
|
return [];
|
|
144741
144741
|
}
|
|
144742
|
-
fragment2.astNode
|
|
144742
|
+
fragment2.astNode = {
|
|
144743
|
+
...fragment2.astNode,
|
|
144744
|
+
selectionSet: {
|
|
144745
|
+
...fragment2.astNode.selectionSet,
|
|
144746
|
+
selections: fragment2.selection.toSelectionSet()
|
|
144747
|
+
}
|
|
144748
|
+
};
|
|
144743
144749
|
return [fragment2.astNode];
|
|
144744
144750
|
}).concat(
|
|
144745
144751
|
Object.values(this.fields).map((field) => {
|
|
@@ -295631,7 +295637,7 @@ import type { ${query.name}$input } from '${path_exports.relative(filepath, path
|
|
|
295631
295637
|
` + typeFile + `
|
|
295632
295638
|
export type ${config5.variableFunctionName(
|
|
295633
295639
|
query.name
|
|
295634
|
-
)} = <_Props
|
|
295640
|
+
)} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.name}$input
|
|
295635
295641
|
`;
|
|
295636
295642
|
}
|
|
295637
295643
|
}
|
package/build/test-esm/index.js
CHANGED
|
@@ -144730,7 +144730,13 @@ var FieldCollection = class {
|
|
|
144730
144730
|
if (fragment2.selection.size === 0) {
|
|
144731
144731
|
return [];
|
|
144732
144732
|
}
|
|
144733
|
-
fragment2.astNode
|
|
144733
|
+
fragment2.astNode = {
|
|
144734
|
+
...fragment2.astNode,
|
|
144735
|
+
selectionSet: {
|
|
144736
|
+
...fragment2.astNode.selectionSet,
|
|
144737
|
+
selections: fragment2.selection.toSelectionSet()
|
|
144738
|
+
}
|
|
144739
|
+
};
|
|
144734
144740
|
return [fragment2.astNode];
|
|
144735
144741
|
}).concat(
|
|
144736
144742
|
Object.values(this.fields).map((field) => {
|
|
@@ -295620,7 +295626,7 @@ import type { ${query.name}$input } from '${path_exports.relative(filepath, path
|
|
|
295620
295626
|
` + typeFile + `
|
|
295621
295627
|
export type ${config5.variableFunctionName(
|
|
295622
295628
|
query.name
|
|
295623
|
-
)} = <_Props
|
|
295629
|
+
)} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.name}$input
|
|
295624
295630
|
`;
|
|
295625
295631
|
}
|
|
295626
295632
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.14",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"recast": "^0.23.1",
|
|
32
32
|
"svelte": "^3.55.1",
|
|
33
33
|
"vite": "^4.0.4",
|
|
34
|
-
"houdini": "^1.0.0-next.
|
|
34
|
+
"houdini": "^1.0.0-next.14"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"build"
|