houdini-react 2.0.0-next.4 → 2.0.0-next.6
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 +13 -7
- package/build/plugin-esm/index.js +13 -7
- package/package.json +2 -2
|
@@ -85518,7 +85518,8 @@ async function load_manifest(args) {
|
|
|
85518
85518
|
const name = child.isDirectory() ? child.name : parse32(child.name).name;
|
|
85519
85519
|
if (name === "+schema") {
|
|
85520
85520
|
manifest2.local_schema = true;
|
|
85521
|
-
}
|
|
85521
|
+
}
|
|
85522
|
+
if (name === "+yoga") {
|
|
85522
85523
|
manifest2.local_yoga = true;
|
|
85523
85524
|
}
|
|
85524
85525
|
}
|
|
@@ -88190,10 +88191,10 @@ var AST3 = recast2.types.builders;
|
|
|
88190
88191
|
function unwrappedTsTypeReference(config, filepath, missingScalars, {
|
|
88191
88192
|
type,
|
|
88192
88193
|
wrappers
|
|
88193
|
-
}, body) {
|
|
88194
|
+
}, body, input) {
|
|
88194
88195
|
let result;
|
|
88195
88196
|
if (graphql6.isScalarType(type)) {
|
|
88196
|
-
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
|
|
88197
|
+
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
|
|
88197
88198
|
} else if (graphql6.isEnumType(type)) {
|
|
88198
88199
|
result = enumReference(config, body, type.name);
|
|
88199
88200
|
} else {
|
|
@@ -88230,7 +88231,7 @@ function nullableField(inner, input = false) {
|
|
|
88230
88231
|
}
|
|
88231
88232
|
return AST3.tsUnionType(members);
|
|
88232
88233
|
}
|
|
88233
|
-
function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
|
|
88234
|
+
function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
|
|
88234
88235
|
if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
|
|
88235
88236
|
if (!field) {
|
|
88236
88237
|
return AST3.tsNeverKeyword();
|
|
@@ -88289,6 +88290,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88289
88290
|
return AST3.tsBooleanKeyword();
|
|
88290
88291
|
}
|
|
88291
88292
|
case "ID": {
|
|
88293
|
+
if (input) {
|
|
88294
|
+
return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
|
|
88295
|
+
}
|
|
88292
88296
|
return AST3.tsStringKeyword();
|
|
88293
88297
|
}
|
|
88294
88298
|
default: {
|
|
@@ -88299,7 +88303,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88299
88303
|
missingScalars,
|
|
88300
88304
|
target.ofType,
|
|
88301
88305
|
body,
|
|
88302
|
-
field
|
|
88306
|
+
field,
|
|
88307
|
+
input
|
|
88303
88308
|
);
|
|
88304
88309
|
}
|
|
88305
88310
|
if (config.scalars?.[target.name]) {
|
|
@@ -89134,7 +89139,7 @@ export function createServerAdapter(options) {
|
|
|
89134
89139
|
}).join("\n")}
|
|
89135
89140
|
|
|
89136
89141
|
${manifest2.local_schema ? `import schema from '../../../../../src/api/+schema'` : " const schema = null"}
|
|
89137
|
-
${manifest2.local_yoga ? `import yoga from '
|
|
89142
|
+
${manifest2.local_yoga ? `import yoga from '../../../../../src/api/+yoga'` : " const yoga = null"}
|
|
89138
89143
|
|
|
89139
89144
|
export const endpoint = ${JSON.stringify(localApiEndpoint(config.configFile))}
|
|
89140
89145
|
|
|
@@ -89252,7 +89257,8 @@ function paramsType(config, params) {
|
|
|
89252
89257
|
type: config.schema.getType(typeInfo.type),
|
|
89253
89258
|
wrappers: typeInfo.wrappers
|
|
89254
89259
|
},
|
|
89255
|
-
[]
|
|
89260
|
+
[],
|
|
89261
|
+
false
|
|
89256
89262
|
)
|
|
89257
89263
|
).code;
|
|
89258
89264
|
}
|
|
@@ -85514,7 +85514,8 @@ async function load_manifest(args) {
|
|
|
85514
85514
|
const name = child.isDirectory() ? child.name : parse32(child.name).name;
|
|
85515
85515
|
if (name === "+schema") {
|
|
85516
85516
|
manifest2.local_schema = true;
|
|
85517
|
-
}
|
|
85517
|
+
}
|
|
85518
|
+
if (name === "+yoga") {
|
|
85518
85519
|
manifest2.local_yoga = true;
|
|
85519
85520
|
}
|
|
85520
85521
|
}
|
|
@@ -88186,10 +88187,10 @@ var AST3 = recast2.types.builders;
|
|
|
88186
88187
|
function unwrappedTsTypeReference(config, filepath, missingScalars, {
|
|
88187
88188
|
type,
|
|
88188
88189
|
wrappers
|
|
88189
|
-
}, body) {
|
|
88190
|
+
}, body, input) {
|
|
88190
88191
|
let result;
|
|
88191
88192
|
if (graphql6.isScalarType(type)) {
|
|
88192
|
-
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
|
|
88193
|
+
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
|
|
88193
88194
|
} else if (graphql6.isEnumType(type)) {
|
|
88194
88195
|
result = enumReference(config, body, type.name);
|
|
88195
88196
|
} else {
|
|
@@ -88226,7 +88227,7 @@ function nullableField(inner, input = false) {
|
|
|
88226
88227
|
}
|
|
88227
88228
|
return AST3.tsUnionType(members);
|
|
88228
88229
|
}
|
|
88229
|
-
function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
|
|
88230
|
+
function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
|
|
88230
88231
|
if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
|
|
88231
88232
|
if (!field) {
|
|
88232
88233
|
return AST3.tsNeverKeyword();
|
|
@@ -88285,6 +88286,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88285
88286
|
return AST3.tsBooleanKeyword();
|
|
88286
88287
|
}
|
|
88287
88288
|
case "ID": {
|
|
88289
|
+
if (input) {
|
|
88290
|
+
return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
|
|
88291
|
+
}
|
|
88288
88292
|
return AST3.tsStringKeyword();
|
|
88289
88293
|
}
|
|
88290
88294
|
default: {
|
|
@@ -88295,7 +88299,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88295
88299
|
missingScalars,
|
|
88296
88300
|
target.ofType,
|
|
88297
88301
|
body,
|
|
88298
|
-
field
|
|
88302
|
+
field,
|
|
88303
|
+
input
|
|
88299
88304
|
);
|
|
88300
88305
|
}
|
|
88301
88306
|
if (config.scalars?.[target.name]) {
|
|
@@ -89130,7 +89135,7 @@ export function createServerAdapter(options) {
|
|
|
89130
89135
|
}).join("\n")}
|
|
89131
89136
|
|
|
89132
89137
|
${manifest2.local_schema ? `import schema from '../../../../../src/api/+schema'` : " const schema = null"}
|
|
89133
|
-
${manifest2.local_yoga ? `import yoga from '
|
|
89138
|
+
${manifest2.local_yoga ? `import yoga from '../../../../../src/api/+yoga'` : " const yoga = null"}
|
|
89134
89139
|
|
|
89135
89140
|
export const endpoint = ${JSON.stringify(localApiEndpoint(config.configFile))}
|
|
89136
89141
|
|
|
@@ -89248,7 +89253,8 @@ function paramsType(config, params) {
|
|
|
89248
89253
|
type: config.schema.getType(typeInfo.type),
|
|
89249
89254
|
wrappers: typeInfo.wrappers
|
|
89250
89255
|
},
|
|
89251
|
-
[]
|
|
89256
|
+
[],
|
|
89257
|
+
false
|
|
89252
89258
|
)
|
|
89253
89259
|
).code;
|
|
89254
89260
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.6",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"recast": "^0.23.1",
|
|
43
43
|
"rollup": "^4.39.0",
|
|
44
44
|
"use-deep-compare-effect": "^1.8.1",
|
|
45
|
-
"houdini": "^2.0.0-next.
|
|
45
|
+
"houdini": "^2.0.0-next.5"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"build"
|