houdini-svelte 2.1.2 → 2.1.3

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.
@@ -3,7 +3,7 @@ import type { RequestEvent } from '@sveltejs/kit';
3
3
  import { BaseStore } from './base';
4
4
  export declare class MutationStore<_Data extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject> extends BaseStore<_Data, _Input, MutationArtifact> {
5
5
  kind: "HoudiniMutation";
6
- mutate(variables: _Input, { metadata, fetch, event, ...mutationConfig }?: {
6
+ mutate(variables: _Input, { metadata, fetch, event, abortController, ...mutationConfig }?: {
7
7
  metadata?: App.Metadata;
8
8
  fetch?: typeof globalThis.fetch;
9
9
  event?: RequestEvent;
@@ -11,4 +11,5 @@ export declare class MutationStore<_Data extends GraphQLObject, _Input extends G
11
11
  }
12
12
  export type MutationConfig<_Result, _Input, _Optimistic> = {
13
13
  optimisticResponse?: _Optimistic;
14
+ abortController?: AbortController;
14
15
  };
@@ -3,7 +3,7 @@ import type { RequestEvent } from '@sveltejs/kit';
3
3
  import { BaseStore } from './base';
4
4
  export declare class MutationStore<_Data extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject> extends BaseStore<_Data, _Input, MutationArtifact> {
5
5
  kind: "HoudiniMutation";
6
- mutate(variables: _Input, { metadata, fetch, event, ...mutationConfig }?: {
6
+ mutate(variables: _Input, { metadata, fetch, event, abortController, ...mutationConfig }?: {
7
7
  metadata?: App.Metadata;
8
8
  fetch?: typeof globalThis.fetch;
9
9
  event?: RequestEvent;
@@ -11,4 +11,5 @@ export declare class MutationStore<_Data extends GraphQLObject, _Input extends G
11
11
  }
12
12
  export type MutationConfig<_Result, _Input, _Optimistic> = {
13
13
  optimisticResponse?: _Optimistic;
14
+ abortController?: AbortController;
14
15
  };
@@ -30,6 +30,7 @@ class MutationStore extends import_base.BaseStore {
30
30
  metadata,
31
31
  fetch,
32
32
  event,
33
+ abortController,
33
34
  ...mutationConfig
34
35
  } = {}) {
35
36
  await (0, import_client.initClient)();
@@ -43,6 +44,7 @@ class MutationStore extends import_base.BaseStore {
43
44
  fetch: context.fetch,
44
45
  metadata,
45
46
  session: context.session,
47
+ abortController,
46
48
  stuff: {
47
49
  ...mutationConfig
48
50
  }
@@ -115,7 +115,8 @@ This will result in duplicate queries. If you are trying to ensure there is alwa
115
115
  metadata: params.metadata,
116
116
  session: context.session,
117
117
  policy: import_types.CachePolicy.CacheOnly,
118
- silenceEcho: true
118
+ silenceEcho: true,
119
+ abortController: params.abortController
119
120
  });
120
121
  }
121
122
  const request = this.observer.send({
@@ -3,7 +3,7 @@ import type { RequestEvent } from '@sveltejs/kit';
3
3
  import { BaseStore } from './base';
4
4
  export declare class MutationStore<_Data extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject> extends BaseStore<_Data, _Input, MutationArtifact> {
5
5
  kind: "HoudiniMutation";
6
- mutate(variables: _Input, { metadata, fetch, event, ...mutationConfig }?: {
6
+ mutate(variables: _Input, { metadata, fetch, event, abortController, ...mutationConfig }?: {
7
7
  metadata?: App.Metadata;
8
8
  fetch?: typeof globalThis.fetch;
9
9
  event?: RequestEvent;
@@ -11,4 +11,5 @@ export declare class MutationStore<_Data extends GraphQLObject, _Input extends G
11
11
  }
12
12
  export type MutationConfig<_Result, _Input, _Optimistic> = {
13
13
  optimisticResponse?: _Optimistic;
14
+ abortController?: AbortController;
14
15
  };
@@ -7,6 +7,7 @@ class MutationStore extends BaseStore {
7
7
  metadata,
8
8
  fetch,
9
9
  event,
10
+ abortController,
10
11
  ...mutationConfig
11
12
  } = {}) {
12
13
  await initClient();
@@ -20,6 +21,7 @@ class MutationStore extends BaseStore {
20
21
  fetch: context.fetch,
21
22
  metadata,
22
23
  session: context.session,
24
+ abortController,
23
25
  stuff: {
24
26
  ...mutationConfig
25
27
  }
@@ -85,7 +85,8 @@ This will result in duplicate queries. If you are trying to ensure there is alwa
85
85
  metadata: params.metadata,
86
86
  session: context.session,
87
87
  policy: CachePolicy.CacheOnly,
88
- silenceEcho: true
88
+ silenceEcho: true,
89
+ abortController: params.abortController
89
90
  });
90
91
  }
91
92
  const request = this.observer.send({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -30,7 +30,7 @@
30
30
  "graphql": "^15.8.0",
31
31
  "recast": "^0.23.1",
32
32
  "rollup": "^4.28.1",
33
- "houdini": "^1.4.2"
33
+ "houdini": "^1.4.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@sveltejs/kit": "^2.9.0",