houdini-react 1.3.1 → 1.3.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.
- package/build/plugin/vite.d.ts +2 -2
- package/build/plugin-cjs/index.js +10178 -6387
- package/build/plugin-esm/index.js +10167 -6376
- package/build/runtime/hooks/useMutation.d.ts +1 -0
- package/build/runtime/index.d.ts +2 -1
- package/build/runtime/routing/Router.d.ts +10 -7
- package/build/runtime-cjs/hooks/useMutation.d.ts +1 -0
- package/build/runtime-cjs/hooks/useMutation.js +2 -0
- package/build/runtime-cjs/index.d.ts +2 -1
- package/build/runtime-cjs/routing/Router.d.ts +10 -7
- package/build/runtime-esm/hooks/useMutation.d.ts +1 -0
- package/build/runtime-esm/hooks/useMutation.js +2 -0
- package/build/runtime-esm/index.d.ts +2 -1
- package/build/runtime-esm/routing/Router.d.ts +10 -7
- package/package.json +8 -9
|
@@ -4,6 +4,7 @@ export type MutationHandler<_Result, _Input, _Optimistic extends GraphQLObject>
|
|
|
4
4
|
metadata?: App.Metadata;
|
|
5
5
|
fetch?: typeof globalThis.fetch;
|
|
6
6
|
optimisticResponse?: _Optimistic;
|
|
7
|
+
abortController?: AbortController;
|
|
7
8
|
}) => Promise<QueryResult<_Result, _Input>>;
|
|
8
9
|
export declare function useMutation<_Result extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject>({ artifact, }: {
|
|
9
10
|
artifact: MutationArtifact;
|
package/build/runtime/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GraphQLObject } from '$houdini/lib/types';
|
|
2
3
|
import type { Cache } from '$houdini/runtime/cache/cache';
|
|
3
4
|
import { RouterCache } from './routing';
|
|
@@ -10,4 +11,4 @@ export declare function Router({ cache, initialURL, artifact_cache, component_ca
|
|
|
10
11
|
session?: App.Session;
|
|
11
12
|
assetPrefix: string;
|
|
12
13
|
injectToStream?: (chunk: string) => void;
|
|
13
|
-
} & RouterCache): JSX.Element;
|
|
14
|
+
} & RouterCache): import("react").JSX.Element;
|
|
@@ -7,6 +7,9 @@ import type { RouterManifest } from '$houdini/runtime/router/types';
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { DocumentHandle } from '../hooks/useDocumentHandle';
|
|
9
9
|
import { SuspenseCache } from './cache';
|
|
10
|
+
type PageComponent = React.ComponentType<{
|
|
11
|
+
url: string;
|
|
12
|
+
}>;
|
|
10
13
|
type ComponentType = any;
|
|
11
14
|
/**
|
|
12
15
|
* Router is the top level entry point for the filesystem-based router.
|
|
@@ -18,7 +21,7 @@ export declare function Router({ manifest, initialURL, assetPrefix, injectToStre
|
|
|
18
21
|
initialURL?: string;
|
|
19
22
|
assetPrefix: string;
|
|
20
23
|
injectToStream?: undefined | ((chunk: string) => void);
|
|
21
|
-
}): JSX.Element;
|
|
24
|
+
}): React.JSX.Element;
|
|
22
25
|
export declare const useLocation: () => {
|
|
23
26
|
pathname: string;
|
|
24
27
|
params: Record<string, any>;
|
|
@@ -29,17 +32,17 @@ export declare function RouterContextProvider({ children, client, cache, artifac
|
|
|
29
32
|
client: HoudiniClient;
|
|
30
33
|
cache: Cache;
|
|
31
34
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
32
|
-
component_cache: SuspenseCache<
|
|
35
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
33
36
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
34
37
|
ssr_signals: PendingCache;
|
|
35
38
|
last_variables: LRUCache<GraphQLVariables>;
|
|
36
39
|
session?: App.Session;
|
|
37
|
-
}): JSX.Element;
|
|
40
|
+
}): React.JSX.Element;
|
|
38
41
|
type RouterContext = {
|
|
39
42
|
client: HoudiniClient;
|
|
40
43
|
cache: Cache;
|
|
41
44
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
42
|
-
component_cache: SuspenseCache<
|
|
45
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
43
46
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
44
47
|
ssr_signals: PendingCache;
|
|
45
48
|
last_variables: LRUCache<GraphQLVariables>;
|
|
@@ -59,7 +62,7 @@ export declare function useCurrentVariables(): GraphQLVariables;
|
|
|
59
62
|
export declare function useQueryResult<_Data extends GraphQLObject, _Input extends GraphQLVariables>(name: string): [_Data | null, DocumentHandle<any, _Data, _Input>];
|
|
60
63
|
export type RouterCache = {
|
|
61
64
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
62
|
-
component_cache: SuspenseCache<
|
|
65
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
63
66
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
64
67
|
last_variables: LRUCache<GraphQLVariables>;
|
|
65
68
|
ssr_signals: PendingCache;
|
|
@@ -67,7 +70,7 @@ export type RouterCache = {
|
|
|
67
70
|
export declare function router_cache({ pending_queries, artifacts, components, initialData, initialVariables, initialArtifacts, }?: {
|
|
68
71
|
pending_queries?: string[];
|
|
69
72
|
artifacts?: Record<string, QueryArtifact>;
|
|
70
|
-
components?: Record<string,
|
|
73
|
+
components?: Record<string, PageComponent>;
|
|
71
74
|
initialData?: Record<string, DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
72
75
|
initialVariables?: Record<string, GraphQLVariables>;
|
|
73
76
|
initialArtifacts?: Record<string, QueryArtifact>;
|
|
@@ -75,7 +78,7 @@ export declare function router_cache({ pending_queries, artifacts, components, i
|
|
|
75
78
|
export declare function PageContextProvider({ keys, children, }: {
|
|
76
79
|
keys: string[];
|
|
77
80
|
children: React.ReactNode;
|
|
78
|
-
}): JSX.Element;
|
|
81
|
+
}): React.JSX.Element;
|
|
79
82
|
export declare function useRoute<PageProps extends {
|
|
80
83
|
Params: {};
|
|
81
84
|
}>(): RouteProp<PageProps['Params']>;
|
|
@@ -4,6 +4,7 @@ export type MutationHandler<_Result, _Input, _Optimistic extends GraphQLObject>
|
|
|
4
4
|
metadata?: App.Metadata;
|
|
5
5
|
fetch?: typeof globalThis.fetch;
|
|
6
6
|
optimisticResponse?: _Optimistic;
|
|
7
|
+
abortController?: AbortController;
|
|
7
8
|
}) => Promise<QueryResult<_Result, _Input>>;
|
|
8
9
|
export declare function useMutation<_Result extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject>({ artifact, }: {
|
|
9
10
|
artifact: MutationArtifact;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GraphQLObject } from '$houdini/lib/types';
|
|
2
3
|
import type { Cache } from '$houdini/runtime/cache/cache';
|
|
3
4
|
import { RouterCache } from './routing';
|
|
@@ -10,4 +11,4 @@ export declare function Router({ cache, initialURL, artifact_cache, component_ca
|
|
|
10
11
|
session?: App.Session;
|
|
11
12
|
assetPrefix: string;
|
|
12
13
|
injectToStream?: (chunk: string) => void;
|
|
13
|
-
} & RouterCache): JSX.Element;
|
|
14
|
+
} & RouterCache): import("react").JSX.Element;
|
|
@@ -7,6 +7,9 @@ import type { RouterManifest } from '$houdini/runtime/router/types';
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { DocumentHandle } from '../hooks/useDocumentHandle';
|
|
9
9
|
import { SuspenseCache } from './cache';
|
|
10
|
+
type PageComponent = React.ComponentType<{
|
|
11
|
+
url: string;
|
|
12
|
+
}>;
|
|
10
13
|
type ComponentType = any;
|
|
11
14
|
/**
|
|
12
15
|
* Router is the top level entry point for the filesystem-based router.
|
|
@@ -18,7 +21,7 @@ export declare function Router({ manifest, initialURL, assetPrefix, injectToStre
|
|
|
18
21
|
initialURL?: string;
|
|
19
22
|
assetPrefix: string;
|
|
20
23
|
injectToStream?: undefined | ((chunk: string) => void);
|
|
21
|
-
}): JSX.Element;
|
|
24
|
+
}): React.JSX.Element;
|
|
22
25
|
export declare const useLocation: () => {
|
|
23
26
|
pathname: string;
|
|
24
27
|
params: Record<string, any>;
|
|
@@ -29,17 +32,17 @@ export declare function RouterContextProvider({ children, client, cache, artifac
|
|
|
29
32
|
client: HoudiniClient;
|
|
30
33
|
cache: Cache;
|
|
31
34
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
32
|
-
component_cache: SuspenseCache<
|
|
35
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
33
36
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
34
37
|
ssr_signals: PendingCache;
|
|
35
38
|
last_variables: LRUCache<GraphQLVariables>;
|
|
36
39
|
session?: App.Session;
|
|
37
|
-
}): JSX.Element;
|
|
40
|
+
}): React.JSX.Element;
|
|
38
41
|
type RouterContext = {
|
|
39
42
|
client: HoudiniClient;
|
|
40
43
|
cache: Cache;
|
|
41
44
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
42
|
-
component_cache: SuspenseCache<
|
|
45
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
43
46
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
44
47
|
ssr_signals: PendingCache;
|
|
45
48
|
last_variables: LRUCache<GraphQLVariables>;
|
|
@@ -59,7 +62,7 @@ export declare function useCurrentVariables(): GraphQLVariables;
|
|
|
59
62
|
export declare function useQueryResult<_Data extends GraphQLObject, _Input extends GraphQLVariables>(name: string): [_Data | null, DocumentHandle<any, _Data, _Input>];
|
|
60
63
|
export type RouterCache = {
|
|
61
64
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
62
|
-
component_cache: SuspenseCache<
|
|
65
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
63
66
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
64
67
|
last_variables: LRUCache<GraphQLVariables>;
|
|
65
68
|
ssr_signals: PendingCache;
|
|
@@ -67,7 +70,7 @@ export type RouterCache = {
|
|
|
67
70
|
export declare function router_cache({ pending_queries, artifacts, components, initialData, initialVariables, initialArtifacts, }?: {
|
|
68
71
|
pending_queries?: string[];
|
|
69
72
|
artifacts?: Record<string, QueryArtifact>;
|
|
70
|
-
components?: Record<string,
|
|
73
|
+
components?: Record<string, PageComponent>;
|
|
71
74
|
initialData?: Record<string, DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
72
75
|
initialVariables?: Record<string, GraphQLVariables>;
|
|
73
76
|
initialArtifacts?: Record<string, QueryArtifact>;
|
|
@@ -75,7 +78,7 @@ export declare function router_cache({ pending_queries, artifacts, components, i
|
|
|
75
78
|
export declare function PageContextProvider({ keys, children, }: {
|
|
76
79
|
keys: string[];
|
|
77
80
|
children: React.ReactNode;
|
|
78
|
-
}): JSX.Element;
|
|
81
|
+
}): React.JSX.Element;
|
|
79
82
|
export declare function useRoute<PageProps extends {
|
|
80
83
|
Params: {};
|
|
81
84
|
}>(): RouteProp<PageProps['Params']>;
|
|
@@ -4,6 +4,7 @@ export type MutationHandler<_Result, _Input, _Optimistic extends GraphQLObject>
|
|
|
4
4
|
metadata?: App.Metadata;
|
|
5
5
|
fetch?: typeof globalThis.fetch;
|
|
6
6
|
optimisticResponse?: _Optimistic;
|
|
7
|
+
abortController?: AbortController;
|
|
7
8
|
}) => Promise<QueryResult<_Result, _Input>>;
|
|
8
9
|
export declare function useMutation<_Result extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject>({ artifact, }: {
|
|
9
10
|
artifact: MutationArtifact;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GraphQLObject } from '$houdini/lib/types';
|
|
2
3
|
import type { Cache } from '$houdini/runtime/cache/cache';
|
|
3
4
|
import { RouterCache } from './routing';
|
|
@@ -10,4 +11,4 @@ export declare function Router({ cache, initialURL, artifact_cache, component_ca
|
|
|
10
11
|
session?: App.Session;
|
|
11
12
|
assetPrefix: string;
|
|
12
13
|
injectToStream?: (chunk: string) => void;
|
|
13
|
-
} & RouterCache): JSX.Element;
|
|
14
|
+
} & RouterCache): import("react").JSX.Element;
|
|
@@ -7,6 +7,9 @@ import type { RouterManifest } from '$houdini/runtime/router/types';
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { DocumentHandle } from '../hooks/useDocumentHandle';
|
|
9
9
|
import { SuspenseCache } from './cache';
|
|
10
|
+
type PageComponent = React.ComponentType<{
|
|
11
|
+
url: string;
|
|
12
|
+
}>;
|
|
10
13
|
type ComponentType = any;
|
|
11
14
|
/**
|
|
12
15
|
* Router is the top level entry point for the filesystem-based router.
|
|
@@ -18,7 +21,7 @@ export declare function Router({ manifest, initialURL, assetPrefix, injectToStre
|
|
|
18
21
|
initialURL?: string;
|
|
19
22
|
assetPrefix: string;
|
|
20
23
|
injectToStream?: undefined | ((chunk: string) => void);
|
|
21
|
-
}): JSX.Element;
|
|
24
|
+
}): React.JSX.Element;
|
|
22
25
|
export declare const useLocation: () => {
|
|
23
26
|
pathname: string;
|
|
24
27
|
params: Record<string, any>;
|
|
@@ -29,17 +32,17 @@ export declare function RouterContextProvider({ children, client, cache, artifac
|
|
|
29
32
|
client: HoudiniClient;
|
|
30
33
|
cache: Cache;
|
|
31
34
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
32
|
-
component_cache: SuspenseCache<
|
|
35
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
33
36
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
34
37
|
ssr_signals: PendingCache;
|
|
35
38
|
last_variables: LRUCache<GraphQLVariables>;
|
|
36
39
|
session?: App.Session;
|
|
37
|
-
}): JSX.Element;
|
|
40
|
+
}): React.JSX.Element;
|
|
38
41
|
type RouterContext = {
|
|
39
42
|
client: HoudiniClient;
|
|
40
43
|
cache: Cache;
|
|
41
44
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
42
|
-
component_cache: SuspenseCache<
|
|
45
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
43
46
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
44
47
|
ssr_signals: PendingCache;
|
|
45
48
|
last_variables: LRUCache<GraphQLVariables>;
|
|
@@ -59,7 +62,7 @@ export declare function useCurrentVariables(): GraphQLVariables;
|
|
|
59
62
|
export declare function useQueryResult<_Data extends GraphQLObject, _Input extends GraphQLVariables>(name: string): [_Data | null, DocumentHandle<any, _Data, _Input>];
|
|
60
63
|
export type RouterCache = {
|
|
61
64
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
62
|
-
component_cache: SuspenseCache<
|
|
65
|
+
component_cache: SuspenseCache<PageComponent>;
|
|
63
66
|
data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
64
67
|
last_variables: LRUCache<GraphQLVariables>;
|
|
65
68
|
ssr_signals: PendingCache;
|
|
@@ -67,7 +70,7 @@ export type RouterCache = {
|
|
|
67
70
|
export declare function router_cache({ pending_queries, artifacts, components, initialData, initialVariables, initialArtifacts, }?: {
|
|
68
71
|
pending_queries?: string[];
|
|
69
72
|
artifacts?: Record<string, QueryArtifact>;
|
|
70
|
-
components?: Record<string,
|
|
73
|
+
components?: Record<string, PageComponent>;
|
|
71
74
|
initialData?: Record<string, DocumentStore<GraphQLObject, GraphQLVariables>>;
|
|
72
75
|
initialVariables?: Record<string, GraphQLVariables>;
|
|
73
76
|
initialArtifacts?: Record<string, QueryArtifact>;
|
|
@@ -75,7 +78,7 @@ export declare function router_cache({ pending_queries, artifacts, components, i
|
|
|
75
78
|
export declare function PageContextProvider({ keys, children, }: {
|
|
76
79
|
keys: string[];
|
|
77
80
|
children: React.ReactNode;
|
|
78
|
-
}): JSX.Element;
|
|
81
|
+
}): React.JSX.Element;
|
|
79
82
|
export declare function useRoute<PageProps extends {
|
|
80
83
|
Params: {};
|
|
81
84
|
}>(): RouteProp<PageProps['Params']>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
"@types/cookies": "^0.7.7",
|
|
22
22
|
"@types/estraverse": "^5.1.2",
|
|
23
23
|
"@types/express": "^4.17.17",
|
|
24
|
-
"@types/react": "^
|
|
25
|
-
"@types/react-dom": "^
|
|
26
|
-
"next": "^13.0.1",
|
|
24
|
+
"@types/react": "^19.0.7",
|
|
25
|
+
"@types/react-dom": "^19.0.3",
|
|
27
26
|
"scripts": "^1.0.0"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
30
|
-
"@babel/parser": "^7.
|
|
31
|
-
"@babel/types": "^7.
|
|
29
|
+
"@babel/parser": "^7.24.6",
|
|
30
|
+
"@babel/types": "^7.24.6",
|
|
32
31
|
"@whatwg-node/server": "^0.9.14",
|
|
33
32
|
"cookie-parser": "^1.4.6",
|
|
34
33
|
"cookie-session": "^2.0.0",
|
|
@@ -37,13 +36,13 @@
|
|
|
37
36
|
"express": "^4.18.2",
|
|
38
37
|
"graphql": "^15.8.0",
|
|
39
38
|
"graphql-yoga": "^4.0.4",
|
|
40
|
-
"react": "19.0.0
|
|
41
|
-
"react-dom": "19.0.0
|
|
39
|
+
"react": "^19.0.0",
|
|
40
|
+
"react-dom": "^19.0.0",
|
|
42
41
|
"react-streaming-compat": "^0.3.18",
|
|
43
42
|
"recast": "^0.23.1",
|
|
44
43
|
"rollup": "^4.28.1",
|
|
45
44
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^1.4.
|
|
45
|
+
"houdini": "^1.4.3"
|
|
47
46
|
},
|
|
48
47
|
"files": [
|
|
49
48
|
"build"
|