houdini-react 0.0.0-20240330051817 → 0.0.0-20240402041558
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.
|
@@ -98,6 +98,10 @@ function Router({
|
|
|
98
98
|
},
|
|
99
99
|
preload(url, which) {
|
|
100
100
|
const [page2, variables2] = (0, import_match.find_match)(import_config.default, manifest, url);
|
|
101
|
+
if (!page2) {
|
|
102
|
+
console.log(url);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
101
105
|
if (["page", "component"].includes(which)) {
|
|
102
106
|
loadComponent(page2);
|
|
103
107
|
}
|
|
@@ -144,6 +148,7 @@ function usePageData({
|
|
|
144
148
|
const promise = new Promise((res, rej) => {
|
|
145
149
|
resolve = res;
|
|
146
150
|
reject = rej;
|
|
151
|
+
console.log("sending query", observer.artifact.name, variables2);
|
|
147
152
|
observer.send({
|
|
148
153
|
variables: variables2,
|
|
149
154
|
session
|
|
@@ -247,6 +252,9 @@ function usePageData({
|
|
|
247
252
|
return resolvable;
|
|
248
253
|
}
|
|
249
254
|
function loadData(targetPage, variables2) {
|
|
255
|
+
if (!targetPage) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
250
258
|
for (const [artifact, { variables: pageVariables }] of Object.entries(
|
|
251
259
|
targetPage.documents
|
|
252
260
|
)) {
|
|
@@ -57,6 +57,10 @@ function Router({
|
|
|
57
57
|
},
|
|
58
58
|
preload(url, which) {
|
|
59
59
|
const [page2, variables2] = find_match(configFile, manifest, url);
|
|
60
|
+
if (!page2) {
|
|
61
|
+
console.log(url);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
60
64
|
if (["page", "component"].includes(which)) {
|
|
61
65
|
loadComponent(page2);
|
|
62
66
|
}
|
|
@@ -103,6 +107,7 @@ function usePageData({
|
|
|
103
107
|
const promise = new Promise((res, rej) => {
|
|
104
108
|
resolve = res;
|
|
105
109
|
reject = rej;
|
|
110
|
+
console.log("sending query", observer.artifact.name, variables2);
|
|
106
111
|
observer.send({
|
|
107
112
|
variables: variables2,
|
|
108
113
|
session
|
|
@@ -206,6 +211,9 @@ function usePageData({
|
|
|
206
211
|
return resolvable;
|
|
207
212
|
}
|
|
208
213
|
function loadData(targetPage, variables2) {
|
|
214
|
+
if (!targetPage) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
209
217
|
for (const [artifact, { variables: pageVariables }] of Object.entries(
|
|
210
218
|
targetPage.documents
|
|
211
219
|
)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20240402041558",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"recast": "^0.23.1",
|
|
44
44
|
"rollup": "^3.7.4",
|
|
45
45
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^0.0.0-
|
|
46
|
+
"houdini": "^0.0.0-20240402041558"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"build"
|