houdini-svelte 1.0.0-next.13 → 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.
@@ -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: Parameters<FetchFn<_Data, _Input>>[0], updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
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: Parameters<FetchFn<_Data, _Input>>[0], updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
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: Parameters<FetchFn<_Data, _Input>>[0], updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.0.0-next.13",
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.13"
34
+ "houdini": "^1.0.0-next.14"
35
35
  },
36
36
  "files": [
37
37
  "build"