houdini-react 2.0.0-next.4 → 2.0.0-next.5
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 +10 -5
- package/build/plugin-esm/index.js +10 -5
- package/package.json +2 -2
|
@@ -88190,10 +88190,10 @@ var AST3 = recast2.types.builders;
|
|
|
88190
88190
|
function unwrappedTsTypeReference(config, filepath, missingScalars, {
|
|
88191
88191
|
type,
|
|
88192
88192
|
wrappers
|
|
88193
|
-
}, body) {
|
|
88193
|
+
}, body, input) {
|
|
88194
88194
|
let result;
|
|
88195
88195
|
if (graphql6.isScalarType(type)) {
|
|
88196
|
-
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
|
|
88196
|
+
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
|
|
88197
88197
|
} else if (graphql6.isEnumType(type)) {
|
|
88198
88198
|
result = enumReference(config, body, type.name);
|
|
88199
88199
|
} else {
|
|
@@ -88230,7 +88230,7 @@ function nullableField(inner, input = false) {
|
|
|
88230
88230
|
}
|
|
88231
88231
|
return AST3.tsUnionType(members);
|
|
88232
88232
|
}
|
|
88233
|
-
function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
|
|
88233
|
+
function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
|
|
88234
88234
|
if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
|
|
88235
88235
|
if (!field) {
|
|
88236
88236
|
return AST3.tsNeverKeyword();
|
|
@@ -88289,6 +88289,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88289
88289
|
return AST3.tsBooleanKeyword();
|
|
88290
88290
|
}
|
|
88291
88291
|
case "ID": {
|
|
88292
|
+
if (input) {
|
|
88293
|
+
return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
|
|
88294
|
+
}
|
|
88292
88295
|
return AST3.tsStringKeyword();
|
|
88293
88296
|
}
|
|
88294
88297
|
default: {
|
|
@@ -88299,7 +88302,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88299
88302
|
missingScalars,
|
|
88300
88303
|
target.ofType,
|
|
88301
88304
|
body,
|
|
88302
|
-
field
|
|
88305
|
+
field,
|
|
88306
|
+
input
|
|
88303
88307
|
);
|
|
88304
88308
|
}
|
|
88305
88309
|
if (config.scalars?.[target.name]) {
|
|
@@ -89252,7 +89256,8 @@ function paramsType(config, params) {
|
|
|
89252
89256
|
type: config.schema.getType(typeInfo.type),
|
|
89253
89257
|
wrappers: typeInfo.wrappers
|
|
89254
89258
|
},
|
|
89255
|
-
[]
|
|
89259
|
+
[],
|
|
89260
|
+
false
|
|
89256
89261
|
)
|
|
89257
89262
|
).code;
|
|
89258
89263
|
}
|
|
@@ -88186,10 +88186,10 @@ var AST3 = recast2.types.builders;
|
|
|
88186
88186
|
function unwrappedTsTypeReference(config, filepath, missingScalars, {
|
|
88187
88187
|
type,
|
|
88188
88188
|
wrappers
|
|
88189
|
-
}, body) {
|
|
88189
|
+
}, body, input) {
|
|
88190
88190
|
let result;
|
|
88191
88191
|
if (graphql6.isScalarType(type)) {
|
|
88192
|
-
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
|
|
88192
|
+
result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
|
|
88193
88193
|
} else if (graphql6.isEnumType(type)) {
|
|
88194
88194
|
result = enumReference(config, body, type.name);
|
|
88195
88195
|
} else {
|
|
@@ -88226,7 +88226,7 @@ function nullableField(inner, input = false) {
|
|
|
88226
88226
|
}
|
|
88227
88227
|
return AST3.tsUnionType(members);
|
|
88228
88228
|
}
|
|
88229
|
-
function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
|
|
88229
|
+
function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
|
|
88230
88230
|
if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
|
|
88231
88231
|
if (!field) {
|
|
88232
88232
|
return AST3.tsNeverKeyword();
|
|
@@ -88285,6 +88285,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88285
88285
|
return AST3.tsBooleanKeyword();
|
|
88286
88286
|
}
|
|
88287
88287
|
case "ID": {
|
|
88288
|
+
if (input) {
|
|
88289
|
+
return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
|
|
88290
|
+
}
|
|
88288
88291
|
return AST3.tsStringKeyword();
|
|
88289
88292
|
}
|
|
88290
88293
|
default: {
|
|
@@ -88295,7 +88298,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
88295
88298
|
missingScalars,
|
|
88296
88299
|
target.ofType,
|
|
88297
88300
|
body,
|
|
88298
|
-
field
|
|
88301
|
+
field,
|
|
88302
|
+
input
|
|
88299
88303
|
);
|
|
88300
88304
|
}
|
|
88301
88305
|
if (config.scalars?.[target.name]) {
|
|
@@ -89248,7 +89252,8 @@ function paramsType(config, params) {
|
|
|
89248
89252
|
type: config.schema.getType(typeInfo.type),
|
|
89249
89253
|
wrappers: typeInfo.wrappers
|
|
89250
89254
|
},
|
|
89251
|
-
[]
|
|
89255
|
+
[],
|
|
89256
|
+
false
|
|
89252
89257
|
)
|
|
89253
89258
|
).code;
|
|
89254
89259
|
}
|
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.5",
|
|
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"
|