houdini-react 1.2.48 → 1.2.50
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 +41910 -41888
- package/build/plugin-esm/index.js +41910 -41888
- package/build/runtime-cjs/hooks/useDocumentHandle.js +9 -4
- package/build/runtime-cjs/routing/Router.js +2 -2
- package/build/runtime-esm/hooks/useDocumentHandle.js +9 -4
- package/build/runtime-esm/routing/Router.js +2 -2
- package/package.json +4 -4
|
@@ -59,10 +59,15 @@ function useDocumentHandle({
|
|
|
59
59
|
};
|
|
60
60
|
const fetchQuery = (args) => {
|
|
61
61
|
const usedVariables = Object.fromEntries(
|
|
62
|
-
Object.keys(observer.artifact.input?.fields ?? {}).
|
|
63
|
-
fieldName
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
Object.keys(observer.artifact.input?.fields ?? {}).reduce(
|
|
63
|
+
(entries, fieldName) => {
|
|
64
|
+
if (!(fieldName in location.params)) {
|
|
65
|
+
return entries;
|
|
66
|
+
}
|
|
67
|
+
return [...entries, [fieldName, location.params[fieldName]]];
|
|
68
|
+
},
|
|
69
|
+
[]
|
|
70
|
+
)
|
|
66
71
|
);
|
|
67
72
|
return observer.send({
|
|
68
73
|
...args,
|
|
@@ -151,7 +151,7 @@ function usePageData({
|
|
|
151
151
|
if (ssr_signals.has(id)) {
|
|
152
152
|
return ssr_signals.get(id);
|
|
153
153
|
}
|
|
154
|
-
const observer = client.observe({ artifact, cache });
|
|
154
|
+
const observer = data_cache.has(artifact.name) ? data_cache.get(artifact.name) : client.observe({ artifact, cache });
|
|
155
155
|
let resolve = () => {
|
|
156
156
|
};
|
|
157
157
|
let reject = () => {
|
|
@@ -175,7 +175,7 @@ function usePageData({
|
|
|
175
175
|
|
|
176
176
|
const artifactName = "${artifact.name}"
|
|
177
177
|
const value = ${JSON.stringify(
|
|
178
|
-
|
|
178
|
+
(0, import_scalars.marshalSelection)({
|
|
179
179
|
selection: observer.artifact.selection,
|
|
180
180
|
data: observer.state.data
|
|
181
181
|
})
|
|
@@ -30,10 +30,15 @@ function useDocumentHandle({
|
|
|
30
30
|
};
|
|
31
31
|
const fetchQuery = (args) => {
|
|
32
32
|
const usedVariables = Object.fromEntries(
|
|
33
|
-
Object.keys(observer.artifact.input?.fields ?? {}).
|
|
34
|
-
fieldName
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
Object.keys(observer.artifact.input?.fields ?? {}).reduce(
|
|
34
|
+
(entries, fieldName) => {
|
|
35
|
+
if (!(fieldName in location.params)) {
|
|
36
|
+
return entries;
|
|
37
|
+
}
|
|
38
|
+
return [...entries, [fieldName, location.params[fieldName]]];
|
|
39
|
+
},
|
|
40
|
+
[]
|
|
41
|
+
)
|
|
37
42
|
);
|
|
38
43
|
return observer.send({
|
|
39
44
|
...args,
|
|
@@ -110,7 +110,7 @@ function usePageData({
|
|
|
110
110
|
if (ssr_signals.has(id)) {
|
|
111
111
|
return ssr_signals.get(id);
|
|
112
112
|
}
|
|
113
|
-
const observer = client.observe({ artifact, cache });
|
|
113
|
+
const observer = data_cache.has(artifact.name) ? data_cache.get(artifact.name) : client.observe({ artifact, cache });
|
|
114
114
|
let resolve = () => {
|
|
115
115
|
};
|
|
116
116
|
let reject = () => {
|
|
@@ -134,7 +134,7 @@ function usePageData({
|
|
|
134
134
|
|
|
135
135
|
const artifactName = "${artifact.name}"
|
|
136
136
|
const value = ${JSON.stringify(
|
|
137
|
-
|
|
137
|
+
marshalSelection({
|
|
138
138
|
selection: observer.artifact.selection,
|
|
139
139
|
data: observer.state.data
|
|
140
140
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"express": "^4.18.2",
|
|
38
38
|
"graphql": "^15.8.0",
|
|
39
39
|
"graphql-yoga": "^4.0.4",
|
|
40
|
-
"react": "19.0.0-
|
|
41
|
-
"react-dom": "19.0.0-
|
|
40
|
+
"react": "19.0.0-rc-eb259b5d3b-20240605",
|
|
41
|
+
"react-dom": "19.0.0-rc-eb259b5d3b-20240605",
|
|
42
42
|
"react-streaming-compat": "^0.3.18",
|
|
43
43
|
"recast": "^0.23.1",
|
|
44
44
|
"rollup": "^3.7.4",
|
|
45
45
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^1.2.
|
|
46
|
+
"houdini": "^1.2.50"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"build"
|