houdini-svelte 1.0.0-next.8 → 1.0.0-next.9
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.
|
@@ -97942,7 +97942,7 @@ var require_definition3 = __commonJS3({
|
|
|
97942
97942
|
exports.assertInterfaceType = assertInterfaceType;
|
|
97943
97943
|
exports.isUnionType = isUnionType13;
|
|
97944
97944
|
exports.assertUnionType = assertUnionType;
|
|
97945
|
-
exports.isEnumType =
|
|
97945
|
+
exports.isEnumType = isEnumType11;
|
|
97946
97946
|
exports.assertEnumType = assertEnumType;
|
|
97947
97947
|
exports.isInputObjectType = isInputObjectType8;
|
|
97948
97948
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -98013,7 +98013,7 @@ var require_definition3 = __commonJS3({
|
|
|
98013
98013
|
return Constructor;
|
|
98014
98014
|
}
|
|
98015
98015
|
function isType(type) {
|
|
98016
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98016
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
98017
98017
|
}
|
|
98018
98018
|
function assertType(type) {
|
|
98019
98019
|
if (!isType(type)) {
|
|
@@ -98057,11 +98057,11 @@ var require_definition3 = __commonJS3({
|
|
|
98057
98057
|
}
|
|
98058
98058
|
return type;
|
|
98059
98059
|
}
|
|
98060
|
-
function
|
|
98060
|
+
function isEnumType11(type) {
|
|
98061
98061
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
98062
98062
|
}
|
|
98063
98063
|
function assertEnumType(type) {
|
|
98064
|
-
if (!
|
|
98064
|
+
if (!isEnumType11(type)) {
|
|
98065
98065
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
98066
98066
|
}
|
|
98067
98067
|
return type;
|
|
@@ -98094,7 +98094,7 @@ var require_definition3 = __commonJS3({
|
|
|
98094
98094
|
return type;
|
|
98095
98095
|
}
|
|
98096
98096
|
function isInputType(type) {
|
|
98097
|
-
return isScalarType13(type) ||
|
|
98097
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
98098
98098
|
}
|
|
98099
98099
|
function assertInputType(type) {
|
|
98100
98100
|
if (!isInputType(type)) {
|
|
@@ -98103,7 +98103,7 @@ var require_definition3 = __commonJS3({
|
|
|
98103
98103
|
return type;
|
|
98104
98104
|
}
|
|
98105
98105
|
function isOutputType(type) {
|
|
98106
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98106
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
98107
98107
|
}
|
|
98108
98108
|
function assertOutputType(type) {
|
|
98109
98109
|
if (!isOutputType(type)) {
|
|
@@ -98112,7 +98112,7 @@ var require_definition3 = __commonJS3({
|
|
|
98112
98112
|
return type;
|
|
98113
98113
|
}
|
|
98114
98114
|
function isLeafType4(type) {
|
|
98115
|
-
return isScalarType13(type) ||
|
|
98115
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
98116
98116
|
}
|
|
98117
98117
|
function assertLeafType(type) {
|
|
98118
98118
|
if (!isLeafType4(type)) {
|
|
@@ -98200,7 +98200,7 @@ var require_definition3 = __commonJS3({
|
|
|
98200
98200
|
}
|
|
98201
98201
|
}
|
|
98202
98202
|
function isNamedType4(type) {
|
|
98203
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98203
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
98204
98204
|
}
|
|
98205
98205
|
function assertNamedType(type) {
|
|
98206
98206
|
if (!isNamedType4(type)) {
|
|
@@ -97936,7 +97936,7 @@ var require_definition3 = __commonJS3({
|
|
|
97936
97936
|
exports.assertInterfaceType = assertInterfaceType;
|
|
97937
97937
|
exports.isUnionType = isUnionType13;
|
|
97938
97938
|
exports.assertUnionType = assertUnionType;
|
|
97939
|
-
exports.isEnumType =
|
|
97939
|
+
exports.isEnumType = isEnumType11;
|
|
97940
97940
|
exports.assertEnumType = assertEnumType;
|
|
97941
97941
|
exports.isInputObjectType = isInputObjectType8;
|
|
97942
97942
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -98007,7 +98007,7 @@ var require_definition3 = __commonJS3({
|
|
|
98007
98007
|
return Constructor;
|
|
98008
98008
|
}
|
|
98009
98009
|
function isType(type) {
|
|
98010
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98010
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
98011
98011
|
}
|
|
98012
98012
|
function assertType(type) {
|
|
98013
98013
|
if (!isType(type)) {
|
|
@@ -98051,11 +98051,11 @@ var require_definition3 = __commonJS3({
|
|
|
98051
98051
|
}
|
|
98052
98052
|
return type;
|
|
98053
98053
|
}
|
|
98054
|
-
function
|
|
98054
|
+
function isEnumType11(type) {
|
|
98055
98055
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
98056
98056
|
}
|
|
98057
98057
|
function assertEnumType(type) {
|
|
98058
|
-
if (!
|
|
98058
|
+
if (!isEnumType11(type)) {
|
|
98059
98059
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
98060
98060
|
}
|
|
98061
98061
|
return type;
|
|
@@ -98088,7 +98088,7 @@ var require_definition3 = __commonJS3({
|
|
|
98088
98088
|
return type;
|
|
98089
98089
|
}
|
|
98090
98090
|
function isInputType(type) {
|
|
98091
|
-
return isScalarType13(type) ||
|
|
98091
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
98092
98092
|
}
|
|
98093
98093
|
function assertInputType(type) {
|
|
98094
98094
|
if (!isInputType(type)) {
|
|
@@ -98097,7 +98097,7 @@ var require_definition3 = __commonJS3({
|
|
|
98097
98097
|
return type;
|
|
98098
98098
|
}
|
|
98099
98099
|
function isOutputType(type) {
|
|
98100
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98100
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
98101
98101
|
}
|
|
98102
98102
|
function assertOutputType(type) {
|
|
98103
98103
|
if (!isOutputType(type)) {
|
|
@@ -98106,7 +98106,7 @@ var require_definition3 = __commonJS3({
|
|
|
98106
98106
|
return type;
|
|
98107
98107
|
}
|
|
98108
98108
|
function isLeafType4(type) {
|
|
98109
|
-
return isScalarType13(type) ||
|
|
98109
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
98110
98110
|
}
|
|
98111
98111
|
function assertLeafType(type) {
|
|
98112
98112
|
if (!isLeafType4(type)) {
|
|
@@ -98194,7 +98194,7 @@ var require_definition3 = __commonJS3({
|
|
|
98194
98194
|
}
|
|
98195
98195
|
}
|
|
98196
98196
|
function isNamedType4(type) {
|
|
98197
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
98197
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
98198
98198
|
}
|
|
98199
98199
|
function assertNamedType(type) {
|
|
98200
98200
|
if (!isNamedType4(type)) {
|
|
@@ -129826,7 +129826,7 @@ var require_definition2 = __commonJS3({
|
|
|
129826
129826
|
exports.assertInterfaceType = assertInterfaceType;
|
|
129827
129827
|
exports.isUnionType = isUnionType13;
|
|
129828
129828
|
exports.assertUnionType = assertUnionType;
|
|
129829
|
-
exports.isEnumType =
|
|
129829
|
+
exports.isEnumType = isEnumType11;
|
|
129830
129830
|
exports.assertEnumType = assertEnumType;
|
|
129831
129831
|
exports.isInputObjectType = isInputObjectType8;
|
|
129832
129832
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -129897,7 +129897,7 @@ var require_definition2 = __commonJS3({
|
|
|
129897
129897
|
return Constructor;
|
|
129898
129898
|
}
|
|
129899
129899
|
function isType(type) {
|
|
129900
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
129900
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
129901
129901
|
}
|
|
129902
129902
|
function assertType(type) {
|
|
129903
129903
|
if (!isType(type)) {
|
|
@@ -129941,11 +129941,11 @@ var require_definition2 = __commonJS3({
|
|
|
129941
129941
|
}
|
|
129942
129942
|
return type;
|
|
129943
129943
|
}
|
|
129944
|
-
function
|
|
129944
|
+
function isEnumType11(type) {
|
|
129945
129945
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
129946
129946
|
}
|
|
129947
129947
|
function assertEnumType(type) {
|
|
129948
|
-
if (!
|
|
129948
|
+
if (!isEnumType11(type)) {
|
|
129949
129949
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
129950
129950
|
}
|
|
129951
129951
|
return type;
|
|
@@ -129978,7 +129978,7 @@ var require_definition2 = __commonJS3({
|
|
|
129978
129978
|
return type;
|
|
129979
129979
|
}
|
|
129980
129980
|
function isInputType(type) {
|
|
129981
|
-
return isScalarType13(type) ||
|
|
129981
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
129982
129982
|
}
|
|
129983
129983
|
function assertInputType(type) {
|
|
129984
129984
|
if (!isInputType(type)) {
|
|
@@ -129987,7 +129987,7 @@ var require_definition2 = __commonJS3({
|
|
|
129987
129987
|
return type;
|
|
129988
129988
|
}
|
|
129989
129989
|
function isOutputType(type) {
|
|
129990
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
129990
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
129991
129991
|
}
|
|
129992
129992
|
function assertOutputType(type) {
|
|
129993
129993
|
if (!isOutputType(type)) {
|
|
@@ -129996,7 +129996,7 @@ var require_definition2 = __commonJS3({
|
|
|
129996
129996
|
return type;
|
|
129997
129997
|
}
|
|
129998
129998
|
function isLeafType4(type) {
|
|
129999
|
-
return isScalarType13(type) ||
|
|
129999
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
130000
130000
|
}
|
|
130001
130001
|
function assertLeafType(type) {
|
|
130002
130002
|
if (!isLeafType4(type)) {
|
|
@@ -130084,7 +130084,7 @@ var require_definition2 = __commonJS3({
|
|
|
130084
130084
|
}
|
|
130085
130085
|
}
|
|
130086
130086
|
function isNamedType4(type) {
|
|
130087
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
130087
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
130088
130088
|
}
|
|
130089
130089
|
function assertNamedType(type) {
|
|
130090
130090
|
if (!isNamedType4(type)) {
|
|
@@ -129818,7 +129818,7 @@ var require_definition2 = __commonJS3({
|
|
|
129818
129818
|
exports.assertInterfaceType = assertInterfaceType;
|
|
129819
129819
|
exports.isUnionType = isUnionType13;
|
|
129820
129820
|
exports.assertUnionType = assertUnionType;
|
|
129821
|
-
exports.isEnumType =
|
|
129821
|
+
exports.isEnumType = isEnumType11;
|
|
129822
129822
|
exports.assertEnumType = assertEnumType;
|
|
129823
129823
|
exports.isInputObjectType = isInputObjectType8;
|
|
129824
129824
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -129889,7 +129889,7 @@ var require_definition2 = __commonJS3({
|
|
|
129889
129889
|
return Constructor;
|
|
129890
129890
|
}
|
|
129891
129891
|
function isType(type) {
|
|
129892
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
129892
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
129893
129893
|
}
|
|
129894
129894
|
function assertType(type) {
|
|
129895
129895
|
if (!isType(type)) {
|
|
@@ -129933,11 +129933,11 @@ var require_definition2 = __commonJS3({
|
|
|
129933
129933
|
}
|
|
129934
129934
|
return type;
|
|
129935
129935
|
}
|
|
129936
|
-
function
|
|
129936
|
+
function isEnumType11(type) {
|
|
129937
129937
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
129938
129938
|
}
|
|
129939
129939
|
function assertEnumType(type) {
|
|
129940
|
-
if (!
|
|
129940
|
+
if (!isEnumType11(type)) {
|
|
129941
129941
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
129942
129942
|
}
|
|
129943
129943
|
return type;
|
|
@@ -129970,7 +129970,7 @@ var require_definition2 = __commonJS3({
|
|
|
129970
129970
|
return type;
|
|
129971
129971
|
}
|
|
129972
129972
|
function isInputType(type) {
|
|
129973
|
-
return isScalarType13(type) ||
|
|
129973
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
129974
129974
|
}
|
|
129975
129975
|
function assertInputType(type) {
|
|
129976
129976
|
if (!isInputType(type)) {
|
|
@@ -129979,7 +129979,7 @@ var require_definition2 = __commonJS3({
|
|
|
129979
129979
|
return type;
|
|
129980
129980
|
}
|
|
129981
129981
|
function isOutputType(type) {
|
|
129982
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
129982
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
129983
129983
|
}
|
|
129984
129984
|
function assertOutputType(type) {
|
|
129985
129985
|
if (!isOutputType(type)) {
|
|
@@ -129988,7 +129988,7 @@ var require_definition2 = __commonJS3({
|
|
|
129988
129988
|
return type;
|
|
129989
129989
|
}
|
|
129990
129990
|
function isLeafType4(type) {
|
|
129991
|
-
return isScalarType13(type) ||
|
|
129991
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
129992
129992
|
}
|
|
129993
129993
|
function assertLeafType(type) {
|
|
129994
129994
|
if (!isLeafType4(type)) {
|
|
@@ -130076,7 +130076,7 @@ var require_definition2 = __commonJS3({
|
|
|
130076
130076
|
}
|
|
130077
130077
|
}
|
|
130078
130078
|
function isNamedType4(type) {
|
|
130079
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
130079
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
130080
130080
|
}
|
|
130081
130081
|
function assertNamedType(type) {
|
|
130082
130082
|
if (!isNamedType4(type)) {
|
package/build/test-cjs/index.js
CHANGED
|
@@ -93804,7 +93804,7 @@ var require_definition2 = __commonJS3({
|
|
|
93804
93804
|
exports.assertInterfaceType = assertInterfaceType;
|
|
93805
93805
|
exports.isUnionType = isUnionType7;
|
|
93806
93806
|
exports.assertUnionType = assertUnionType;
|
|
93807
|
-
exports.isEnumType =
|
|
93807
|
+
exports.isEnumType = isEnumType6;
|
|
93808
93808
|
exports.assertEnumType = assertEnumType;
|
|
93809
93809
|
exports.isInputObjectType = isInputObjectType2;
|
|
93810
93810
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -93875,7 +93875,7 @@ var require_definition2 = __commonJS3({
|
|
|
93875
93875
|
return Constructor;
|
|
93876
93876
|
}
|
|
93877
93877
|
function isType(type) {
|
|
93878
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
93878
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type) || isListType3(type) || isNonNullType6(type);
|
|
93879
93879
|
}
|
|
93880
93880
|
function assertType(type) {
|
|
93881
93881
|
if (!isType(type)) {
|
|
@@ -93919,11 +93919,11 @@ var require_definition2 = __commonJS3({
|
|
|
93919
93919
|
}
|
|
93920
93920
|
return type;
|
|
93921
93921
|
}
|
|
93922
|
-
function
|
|
93922
|
+
function isEnumType6(type) {
|
|
93923
93923
|
return (0, _instanceOf.default)(type, GraphQLEnumType);
|
|
93924
93924
|
}
|
|
93925
93925
|
function assertEnumType(type) {
|
|
93926
|
-
if (!
|
|
93926
|
+
if (!isEnumType6(type)) {
|
|
93927
93927
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
93928
93928
|
}
|
|
93929
93929
|
return type;
|
|
@@ -93956,7 +93956,7 @@ var require_definition2 = __commonJS3({
|
|
|
93956
93956
|
return type;
|
|
93957
93957
|
}
|
|
93958
93958
|
function isInputType(type) {
|
|
93959
|
-
return isScalarType7(type) ||
|
|
93959
|
+
return isScalarType7(type) || isEnumType6(type) || isInputObjectType2(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
93960
93960
|
}
|
|
93961
93961
|
function assertInputType(type) {
|
|
93962
93962
|
if (!isInputType(type)) {
|
|
@@ -93965,7 +93965,7 @@ var require_definition2 = __commonJS3({
|
|
|
93965
93965
|
return type;
|
|
93966
93966
|
}
|
|
93967
93967
|
function isOutputType(type) {
|
|
93968
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
93968
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
93969
93969
|
}
|
|
93970
93970
|
function assertOutputType(type) {
|
|
93971
93971
|
if (!isOutputType(type)) {
|
|
@@ -93974,7 +93974,7 @@ var require_definition2 = __commonJS3({
|
|
|
93974
93974
|
return type;
|
|
93975
93975
|
}
|
|
93976
93976
|
function isLeafType(type) {
|
|
93977
|
-
return isScalarType7(type) ||
|
|
93977
|
+
return isScalarType7(type) || isEnumType6(type);
|
|
93978
93978
|
}
|
|
93979
93979
|
function assertLeafType(type) {
|
|
93980
93980
|
if (!isLeafType(type)) {
|
|
@@ -94062,7 +94062,7 @@ var require_definition2 = __commonJS3({
|
|
|
94062
94062
|
}
|
|
94063
94063
|
}
|
|
94064
94064
|
function isNamedType(type) {
|
|
94065
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
94065
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type);
|
|
94066
94066
|
}
|
|
94067
94067
|
function assertNamedType(type) {
|
|
94068
94068
|
if (!isNamedType(type)) {
|
|
@@ -147072,11 +147072,13 @@ function scalarPropertyValue(config22, missingScalars, target) {
|
|
|
147072
147072
|
}
|
|
147073
147073
|
}
|
|
147074
147074
|
var AST8 = recast8.types.builders;
|
|
147075
|
-
function tsTypeReference(config22, missingScalars, definition) {
|
|
147075
|
+
function tsTypeReference(config22, missingScalars, definition, body) {
|
|
147076
147076
|
const { type, wrappers } = unwrapType2(config22, definition.type);
|
|
147077
147077
|
let result;
|
|
147078
147078
|
if (graphql14.isScalarType(type)) {
|
|
147079
147079
|
result = scalarPropertyValue(config22, missingScalars, type);
|
|
147080
|
+
} else if (graphql14.isEnumType(type)) {
|
|
147081
|
+
result = enumReference(config22, body, type.name);
|
|
147080
147082
|
} else {
|
|
147081
147083
|
result = AST8.tsTypeReference(AST8.identifier(type.name));
|
|
147082
147084
|
}
|
|
@@ -147091,6 +147093,19 @@ function tsTypeReference(config22, missingScalars, definition) {
|
|
|
147091
147093
|
}
|
|
147092
147094
|
return result;
|
|
147093
147095
|
}
|
|
147096
|
+
function enumReference(config22, body, name) {
|
|
147097
|
+
ensureImports2({
|
|
147098
|
+
config: config22,
|
|
147099
|
+
body,
|
|
147100
|
+
import: ["ValueOf"],
|
|
147101
|
+
importKind: "type",
|
|
147102
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
147103
|
+
});
|
|
147104
|
+
return AST8.tsTypeReference(
|
|
147105
|
+
AST8.identifier("ValueOf"),
|
|
147106
|
+
AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
|
|
147107
|
+
);
|
|
147108
|
+
}
|
|
147094
147109
|
var AST9 = recast9.types.builders;
|
|
147095
147110
|
function addReferencedInputTypes(config22, filepath, body, visitedTypes, missingScalars, rootType) {
|
|
147096
147111
|
const { type } = unwrapType2(config22, rootType);
|
|
@@ -147120,7 +147135,7 @@ function addReferencedInputTypes(config22, filepath, body, visitedTypes, missing
|
|
|
147120
147135
|
members.push(
|
|
147121
147136
|
AST9.tsPropertySignature(
|
|
147122
147137
|
AST9.identifier(field.name),
|
|
147123
|
-
AST9.tsTypeAnnotation(tsTypeReference(config22, missingScalars, field)),
|
|
147138
|
+
AST9.tsTypeAnnotation(tsTypeReference(config22, missingScalars, field, body)),
|
|
147124
147139
|
graphql15.isNullableType(field.type)
|
|
147125
147140
|
)
|
|
147126
147141
|
);
|
|
@@ -147149,6 +147164,13 @@ function inlineType({
|
|
|
147149
147164
|
if (graphql16.isScalarType(type)) {
|
|
147150
147165
|
result = scalarPropertyValue(config22, missingScalars, type);
|
|
147151
147166
|
} else if (graphql16.isEnumType(type)) {
|
|
147167
|
+
ensureImports2({
|
|
147168
|
+
config: config22,
|
|
147169
|
+
body,
|
|
147170
|
+
importKind: "type",
|
|
147171
|
+
import: ["ValueOf"],
|
|
147172
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
147173
|
+
});
|
|
147152
147174
|
if (!visitedTypes.has(type.name)) {
|
|
147153
147175
|
ensureImports2({
|
|
147154
147176
|
config: config22,
|
|
@@ -147158,7 +147180,7 @@ function inlineType({
|
|
|
147158
147180
|
});
|
|
147159
147181
|
visitedTypes.add(type.name);
|
|
147160
147182
|
}
|
|
147161
|
-
result =
|
|
147183
|
+
result = enumReference(config22, body, type.name);
|
|
147162
147184
|
} else if (selections) {
|
|
147163
147185
|
const rootObj = type;
|
|
147164
147186
|
const inlineFragments = {};
|
|
@@ -147589,7 +147611,7 @@ async function generateOperationTypeDefs(config22, filepath, body, definition, s
|
|
|
147589
147611
|
return AST11.tsPropertySignature(
|
|
147590
147612
|
AST11.identifier(definition2.variable.name.value),
|
|
147591
147613
|
AST11.tsTypeAnnotation(
|
|
147592
|
-
tsTypeReference(config22, missingScalars, definition2)
|
|
147614
|
+
tsTypeReference(config22, missingScalars, definition2, body)
|
|
147593
147615
|
),
|
|
147594
147616
|
definition2.type.kind !== "NonNullType"
|
|
147595
147617
|
);
|
|
@@ -147656,7 +147678,12 @@ async function generateFragmentTypeDefs(config22, filepath, body, selections, de
|
|
|
147656
147678
|
return AST11.tsPropertySignature(
|
|
147657
147679
|
AST11.identifier(definition2.variable.name.value),
|
|
147658
147680
|
AST11.tsTypeAnnotation(
|
|
147659
|
-
tsTypeReference(
|
|
147681
|
+
tsTypeReference(
|
|
147682
|
+
config22,
|
|
147683
|
+
missingScalars,
|
|
147684
|
+
definition2,
|
|
147685
|
+
body
|
|
147686
|
+
)
|
|
147660
147687
|
),
|
|
147661
147688
|
definition2.type.kind !== "NonNullType"
|
|
147662
147689
|
);
|
|
@@ -147747,7 +147774,7 @@ async function imperativeCacheTypef(config22, docs) {
|
|
|
147747
147774
|
),
|
|
147748
147775
|
AST12.tsPropertySignature(
|
|
147749
147776
|
AST12.identifier("lists"),
|
|
147750
|
-
AST12.tsTypeAnnotation(listDefinitions(config22, docs))
|
|
147777
|
+
AST12.tsTypeAnnotation(listDefinitions(config22, body, docs))
|
|
147751
147778
|
),
|
|
147752
147779
|
AST12.tsPropertySignature(
|
|
147753
147780
|
AST12.identifier("queries"),
|
|
@@ -147856,7 +147883,7 @@ function typeDefinitions(config22, body, docs, returnType) {
|
|
|
147856
147883
|
const prop = AST12.tsPropertySignature(
|
|
147857
147884
|
AST12.identifier(arg.name),
|
|
147858
147885
|
AST12.tsTypeAnnotation(
|
|
147859
|
-
tsTypeReference(config22, /* @__PURE__ */ new Set(), arg)
|
|
147886
|
+
tsTypeReference(config22, /* @__PURE__ */ new Set(), arg, body)
|
|
147860
147887
|
)
|
|
147861
147888
|
);
|
|
147862
147889
|
const unwrapped2 = unwrapType2(config22, arg.type);
|
|
@@ -147906,7 +147933,7 @@ function typeDefinitions(config22, body, docs, returnType) {
|
|
|
147906
147933
|
})
|
|
147907
147934
|
);
|
|
147908
147935
|
}
|
|
147909
|
-
function listDefinitions(config22, docs) {
|
|
147936
|
+
function listDefinitions(config22, body, docs) {
|
|
147910
147937
|
const lists = [];
|
|
147911
147938
|
const visitedLists = /* @__PURE__ */ new Set();
|
|
147912
147939
|
for (const doc of docs) {
|
|
@@ -147963,7 +147990,8 @@ function listDefinitions(config22, docs) {
|
|
|
147963
147990
|
tsTypeReference(
|
|
147964
147991
|
config22,
|
|
147965
147992
|
/* @__PURE__ */ new Set(),
|
|
147966
|
-
arg
|
|
147993
|
+
arg,
|
|
147994
|
+
body
|
|
147967
147995
|
)
|
|
147968
147996
|
)
|
|
147969
147997
|
);
|
|
@@ -148151,9 +148179,9 @@ async function definitionsGenerator(config22) {
|
|
|
148151
148179
|
).code;
|
|
148152
148180
|
const typeDefinitions2 = enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map(
|
|
148153
148181
|
(definition) => `
|
|
148154
|
-
export
|
|
148155
|
-
${definition.values?.map((value2) => ` ${value2.name.value}
|
|
148156
|
-
}
|
|
148182
|
+
export const ${definition.name.value} = {
|
|
148183
|
+
${definition.values?.map((value2) => ` ${value2.name.value}: "${value2.name.value}"`).join(",\n")}
|
|
148184
|
+
} as const
|
|
148157
148185
|
`
|
|
148158
148186
|
).join("");
|
|
148159
148187
|
const definitionsIndex = `
|
|
@@ -152644,7 +152672,7 @@ var require_definition3 = __commonJS4({
|
|
|
152644
152672
|
exports.assertInterfaceType = assertInterfaceType;
|
|
152645
152673
|
exports.isUnionType = isUnionType7;
|
|
152646
152674
|
exports.assertUnionType = assertUnionType;
|
|
152647
|
-
exports.isEnumType =
|
|
152675
|
+
exports.isEnumType = isEnumType6;
|
|
152648
152676
|
exports.assertEnumType = assertEnumType;
|
|
152649
152677
|
exports.isInputObjectType = isInputObjectType2;
|
|
152650
152678
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -152715,7 +152743,7 @@ var require_definition3 = __commonJS4({
|
|
|
152715
152743
|
return Constructor;
|
|
152716
152744
|
}
|
|
152717
152745
|
function isType(type) {
|
|
152718
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152746
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type) || isListType3(type) || isNonNullType6(type);
|
|
152719
152747
|
}
|
|
152720
152748
|
function assertType(type) {
|
|
152721
152749
|
if (!isType(type)) {
|
|
@@ -152759,11 +152787,11 @@ var require_definition3 = __commonJS4({
|
|
|
152759
152787
|
}
|
|
152760
152788
|
return type;
|
|
152761
152789
|
}
|
|
152762
|
-
function
|
|
152790
|
+
function isEnumType6(type) {
|
|
152763
152791
|
return (0, _instanceOf.default)(type, GraphQLEnumType);
|
|
152764
152792
|
}
|
|
152765
152793
|
function assertEnumType(type) {
|
|
152766
|
-
if (!
|
|
152794
|
+
if (!isEnumType6(type)) {
|
|
152767
152795
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
152768
152796
|
}
|
|
152769
152797
|
return type;
|
|
@@ -152796,7 +152824,7 @@ var require_definition3 = __commonJS4({
|
|
|
152796
152824
|
return type;
|
|
152797
152825
|
}
|
|
152798
152826
|
function isInputType(type) {
|
|
152799
|
-
return isScalarType7(type) ||
|
|
152827
|
+
return isScalarType7(type) || isEnumType6(type) || isInputObjectType2(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
152800
152828
|
}
|
|
152801
152829
|
function assertInputType(type) {
|
|
152802
152830
|
if (!isInputType(type)) {
|
|
@@ -152805,7 +152833,7 @@ var require_definition3 = __commonJS4({
|
|
|
152805
152833
|
return type;
|
|
152806
152834
|
}
|
|
152807
152835
|
function isOutputType(type) {
|
|
152808
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152836
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
152809
152837
|
}
|
|
152810
152838
|
function assertOutputType(type) {
|
|
152811
152839
|
if (!isOutputType(type)) {
|
|
@@ -152814,7 +152842,7 @@ var require_definition3 = __commonJS4({
|
|
|
152814
152842
|
return type;
|
|
152815
152843
|
}
|
|
152816
152844
|
function isLeafType(type) {
|
|
152817
|
-
return isScalarType7(type) ||
|
|
152845
|
+
return isScalarType7(type) || isEnumType6(type);
|
|
152818
152846
|
}
|
|
152819
152847
|
function assertLeafType(type) {
|
|
152820
152848
|
if (!isLeafType(type)) {
|
|
@@ -152902,7 +152930,7 @@ var require_definition3 = __commonJS4({
|
|
|
152902
152930
|
}
|
|
152903
152931
|
}
|
|
152904
152932
|
function isNamedType(type) {
|
|
152905
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152933
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type);
|
|
152906
152934
|
}
|
|
152907
152935
|
function assertNamedType(type) {
|
|
152908
152936
|
if (!isNamedType(type)) {
|
|
@@ -211588,7 +211616,7 @@ var require_definition5 = __commonJS5({
|
|
|
211588
211616
|
exports.assertInterfaceType = assertInterfaceType;
|
|
211589
211617
|
exports.isUnionType = isUnionType13;
|
|
211590
211618
|
exports.assertUnionType = assertUnionType;
|
|
211591
|
-
exports.isEnumType =
|
|
211619
|
+
exports.isEnumType = isEnumType11;
|
|
211592
211620
|
exports.assertEnumType = assertEnumType;
|
|
211593
211621
|
exports.isInputObjectType = isInputObjectType8;
|
|
211594
211622
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -211659,7 +211687,7 @@ var require_definition5 = __commonJS5({
|
|
|
211659
211687
|
return Constructor;
|
|
211660
211688
|
}
|
|
211661
211689
|
function isType(type) {
|
|
211662
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211690
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
211663
211691
|
}
|
|
211664
211692
|
function assertType(type) {
|
|
211665
211693
|
if (!isType(type)) {
|
|
@@ -211703,11 +211731,11 @@ var require_definition5 = __commonJS5({
|
|
|
211703
211731
|
}
|
|
211704
211732
|
return type;
|
|
211705
211733
|
}
|
|
211706
|
-
function
|
|
211734
|
+
function isEnumType11(type) {
|
|
211707
211735
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
211708
211736
|
}
|
|
211709
211737
|
function assertEnumType(type) {
|
|
211710
|
-
if (!
|
|
211738
|
+
if (!isEnumType11(type)) {
|
|
211711
211739
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
211712
211740
|
}
|
|
211713
211741
|
return type;
|
|
@@ -211740,7 +211768,7 @@ var require_definition5 = __commonJS5({
|
|
|
211740
211768
|
return type;
|
|
211741
211769
|
}
|
|
211742
211770
|
function isInputType(type) {
|
|
211743
|
-
return isScalarType13(type) ||
|
|
211771
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
211744
211772
|
}
|
|
211745
211773
|
function assertInputType(type) {
|
|
211746
211774
|
if (!isInputType(type)) {
|
|
@@ -211749,7 +211777,7 @@ var require_definition5 = __commonJS5({
|
|
|
211749
211777
|
return type;
|
|
211750
211778
|
}
|
|
211751
211779
|
function isOutputType(type) {
|
|
211752
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211780
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
211753
211781
|
}
|
|
211754
211782
|
function assertOutputType(type) {
|
|
211755
211783
|
if (!isOutputType(type)) {
|
|
@@ -211758,7 +211786,7 @@ var require_definition5 = __commonJS5({
|
|
|
211758
211786
|
return type;
|
|
211759
211787
|
}
|
|
211760
211788
|
function isLeafType4(type) {
|
|
211761
|
-
return isScalarType13(type) ||
|
|
211789
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
211762
211790
|
}
|
|
211763
211791
|
function assertLeafType(type) {
|
|
211764
211792
|
if (!isLeafType4(type)) {
|
|
@@ -211846,7 +211874,7 @@ var require_definition5 = __commonJS5({
|
|
|
211846
211874
|
}
|
|
211847
211875
|
}
|
|
211848
211876
|
function isNamedType4(type) {
|
|
211849
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211877
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
211850
211878
|
}
|
|
211851
211879
|
function assertNamedType(type) {
|
|
211852
211880
|
if (!isNamedType4(type)) {
|
package/build/test-esm/index.js
CHANGED
|
@@ -93795,7 +93795,7 @@ var require_definition2 = __commonJS3({
|
|
|
93795
93795
|
exports.assertInterfaceType = assertInterfaceType;
|
|
93796
93796
|
exports.isUnionType = isUnionType7;
|
|
93797
93797
|
exports.assertUnionType = assertUnionType;
|
|
93798
|
-
exports.isEnumType =
|
|
93798
|
+
exports.isEnumType = isEnumType6;
|
|
93799
93799
|
exports.assertEnumType = assertEnumType;
|
|
93800
93800
|
exports.isInputObjectType = isInputObjectType2;
|
|
93801
93801
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -93866,7 +93866,7 @@ var require_definition2 = __commonJS3({
|
|
|
93866
93866
|
return Constructor;
|
|
93867
93867
|
}
|
|
93868
93868
|
function isType(type) {
|
|
93869
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
93869
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type) || isListType3(type) || isNonNullType6(type);
|
|
93870
93870
|
}
|
|
93871
93871
|
function assertType(type) {
|
|
93872
93872
|
if (!isType(type)) {
|
|
@@ -93910,11 +93910,11 @@ var require_definition2 = __commonJS3({
|
|
|
93910
93910
|
}
|
|
93911
93911
|
return type;
|
|
93912
93912
|
}
|
|
93913
|
-
function
|
|
93913
|
+
function isEnumType6(type) {
|
|
93914
93914
|
return (0, _instanceOf.default)(type, GraphQLEnumType);
|
|
93915
93915
|
}
|
|
93916
93916
|
function assertEnumType(type) {
|
|
93917
|
-
if (!
|
|
93917
|
+
if (!isEnumType6(type)) {
|
|
93918
93918
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
93919
93919
|
}
|
|
93920
93920
|
return type;
|
|
@@ -93947,7 +93947,7 @@ var require_definition2 = __commonJS3({
|
|
|
93947
93947
|
return type;
|
|
93948
93948
|
}
|
|
93949
93949
|
function isInputType(type) {
|
|
93950
|
-
return isScalarType7(type) ||
|
|
93950
|
+
return isScalarType7(type) || isEnumType6(type) || isInputObjectType2(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
93951
93951
|
}
|
|
93952
93952
|
function assertInputType(type) {
|
|
93953
93953
|
if (!isInputType(type)) {
|
|
@@ -93956,7 +93956,7 @@ var require_definition2 = __commonJS3({
|
|
|
93956
93956
|
return type;
|
|
93957
93957
|
}
|
|
93958
93958
|
function isOutputType(type) {
|
|
93959
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
93959
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
93960
93960
|
}
|
|
93961
93961
|
function assertOutputType(type) {
|
|
93962
93962
|
if (!isOutputType(type)) {
|
|
@@ -93965,7 +93965,7 @@ var require_definition2 = __commonJS3({
|
|
|
93965
93965
|
return type;
|
|
93966
93966
|
}
|
|
93967
93967
|
function isLeafType(type) {
|
|
93968
|
-
return isScalarType7(type) ||
|
|
93968
|
+
return isScalarType7(type) || isEnumType6(type);
|
|
93969
93969
|
}
|
|
93970
93970
|
function assertLeafType(type) {
|
|
93971
93971
|
if (!isLeafType(type)) {
|
|
@@ -94053,7 +94053,7 @@ var require_definition2 = __commonJS3({
|
|
|
94053
94053
|
}
|
|
94054
94054
|
}
|
|
94055
94055
|
function isNamedType(type) {
|
|
94056
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
94056
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type);
|
|
94057
94057
|
}
|
|
94058
94058
|
function assertNamedType(type) {
|
|
94059
94059
|
if (!isNamedType(type)) {
|
|
@@ -147063,11 +147063,13 @@ function scalarPropertyValue(config22, missingScalars, target) {
|
|
|
147063
147063
|
}
|
|
147064
147064
|
}
|
|
147065
147065
|
var AST8 = recast8.types.builders;
|
|
147066
|
-
function tsTypeReference(config22, missingScalars, definition) {
|
|
147066
|
+
function tsTypeReference(config22, missingScalars, definition, body) {
|
|
147067
147067
|
const { type, wrappers } = unwrapType2(config22, definition.type);
|
|
147068
147068
|
let result;
|
|
147069
147069
|
if (graphql14.isScalarType(type)) {
|
|
147070
147070
|
result = scalarPropertyValue(config22, missingScalars, type);
|
|
147071
|
+
} else if (graphql14.isEnumType(type)) {
|
|
147072
|
+
result = enumReference(config22, body, type.name);
|
|
147071
147073
|
} else {
|
|
147072
147074
|
result = AST8.tsTypeReference(AST8.identifier(type.name));
|
|
147073
147075
|
}
|
|
@@ -147082,6 +147084,19 @@ function tsTypeReference(config22, missingScalars, definition) {
|
|
|
147082
147084
|
}
|
|
147083
147085
|
return result;
|
|
147084
147086
|
}
|
|
147087
|
+
function enumReference(config22, body, name) {
|
|
147088
|
+
ensureImports2({
|
|
147089
|
+
config: config22,
|
|
147090
|
+
body,
|
|
147091
|
+
import: ["ValueOf"],
|
|
147092
|
+
importKind: "type",
|
|
147093
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
147094
|
+
});
|
|
147095
|
+
return AST8.tsTypeReference(
|
|
147096
|
+
AST8.identifier("ValueOf"),
|
|
147097
|
+
AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
|
|
147098
|
+
);
|
|
147099
|
+
}
|
|
147085
147100
|
var AST9 = recast9.types.builders;
|
|
147086
147101
|
function addReferencedInputTypes(config22, filepath, body, visitedTypes, missingScalars, rootType) {
|
|
147087
147102
|
const { type } = unwrapType2(config22, rootType);
|
|
@@ -147111,7 +147126,7 @@ function addReferencedInputTypes(config22, filepath, body, visitedTypes, missing
|
|
|
147111
147126
|
members.push(
|
|
147112
147127
|
AST9.tsPropertySignature(
|
|
147113
147128
|
AST9.identifier(field.name),
|
|
147114
|
-
AST9.tsTypeAnnotation(tsTypeReference(config22, missingScalars, field)),
|
|
147129
|
+
AST9.tsTypeAnnotation(tsTypeReference(config22, missingScalars, field, body)),
|
|
147115
147130
|
graphql15.isNullableType(field.type)
|
|
147116
147131
|
)
|
|
147117
147132
|
);
|
|
@@ -147140,6 +147155,13 @@ function inlineType({
|
|
|
147140
147155
|
if (graphql16.isScalarType(type)) {
|
|
147141
147156
|
result = scalarPropertyValue(config22, missingScalars, type);
|
|
147142
147157
|
} else if (graphql16.isEnumType(type)) {
|
|
147158
|
+
ensureImports2({
|
|
147159
|
+
config: config22,
|
|
147160
|
+
body,
|
|
147161
|
+
importKind: "type",
|
|
147162
|
+
import: ["ValueOf"],
|
|
147163
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
147164
|
+
});
|
|
147143
147165
|
if (!visitedTypes.has(type.name)) {
|
|
147144
147166
|
ensureImports2({
|
|
147145
147167
|
config: config22,
|
|
@@ -147149,7 +147171,7 @@ function inlineType({
|
|
|
147149
147171
|
});
|
|
147150
147172
|
visitedTypes.add(type.name);
|
|
147151
147173
|
}
|
|
147152
|
-
result =
|
|
147174
|
+
result = enumReference(config22, body, type.name);
|
|
147153
147175
|
} else if (selections) {
|
|
147154
147176
|
const rootObj = type;
|
|
147155
147177
|
const inlineFragments = {};
|
|
@@ -147580,7 +147602,7 @@ async function generateOperationTypeDefs(config22, filepath, body, definition, s
|
|
|
147580
147602
|
return AST11.tsPropertySignature(
|
|
147581
147603
|
AST11.identifier(definition2.variable.name.value),
|
|
147582
147604
|
AST11.tsTypeAnnotation(
|
|
147583
|
-
tsTypeReference(config22, missingScalars, definition2)
|
|
147605
|
+
tsTypeReference(config22, missingScalars, definition2, body)
|
|
147584
147606
|
),
|
|
147585
147607
|
definition2.type.kind !== "NonNullType"
|
|
147586
147608
|
);
|
|
@@ -147647,7 +147669,12 @@ async function generateFragmentTypeDefs(config22, filepath, body, selections, de
|
|
|
147647
147669
|
return AST11.tsPropertySignature(
|
|
147648
147670
|
AST11.identifier(definition2.variable.name.value),
|
|
147649
147671
|
AST11.tsTypeAnnotation(
|
|
147650
|
-
tsTypeReference(
|
|
147672
|
+
tsTypeReference(
|
|
147673
|
+
config22,
|
|
147674
|
+
missingScalars,
|
|
147675
|
+
definition2,
|
|
147676
|
+
body
|
|
147677
|
+
)
|
|
147651
147678
|
),
|
|
147652
147679
|
definition2.type.kind !== "NonNullType"
|
|
147653
147680
|
);
|
|
@@ -147738,7 +147765,7 @@ async function imperativeCacheTypef(config22, docs) {
|
|
|
147738
147765
|
),
|
|
147739
147766
|
AST12.tsPropertySignature(
|
|
147740
147767
|
AST12.identifier("lists"),
|
|
147741
|
-
AST12.tsTypeAnnotation(listDefinitions(config22, docs))
|
|
147768
|
+
AST12.tsTypeAnnotation(listDefinitions(config22, body, docs))
|
|
147742
147769
|
),
|
|
147743
147770
|
AST12.tsPropertySignature(
|
|
147744
147771
|
AST12.identifier("queries"),
|
|
@@ -147847,7 +147874,7 @@ function typeDefinitions(config22, body, docs, returnType) {
|
|
|
147847
147874
|
const prop = AST12.tsPropertySignature(
|
|
147848
147875
|
AST12.identifier(arg.name),
|
|
147849
147876
|
AST12.tsTypeAnnotation(
|
|
147850
|
-
tsTypeReference(config22, /* @__PURE__ */ new Set(), arg)
|
|
147877
|
+
tsTypeReference(config22, /* @__PURE__ */ new Set(), arg, body)
|
|
147851
147878
|
)
|
|
147852
147879
|
);
|
|
147853
147880
|
const unwrapped2 = unwrapType2(config22, arg.type);
|
|
@@ -147897,7 +147924,7 @@ function typeDefinitions(config22, body, docs, returnType) {
|
|
|
147897
147924
|
})
|
|
147898
147925
|
);
|
|
147899
147926
|
}
|
|
147900
|
-
function listDefinitions(config22, docs) {
|
|
147927
|
+
function listDefinitions(config22, body, docs) {
|
|
147901
147928
|
const lists = [];
|
|
147902
147929
|
const visitedLists = /* @__PURE__ */ new Set();
|
|
147903
147930
|
for (const doc of docs) {
|
|
@@ -147954,7 +147981,8 @@ function listDefinitions(config22, docs) {
|
|
|
147954
147981
|
tsTypeReference(
|
|
147955
147982
|
config22,
|
|
147956
147983
|
/* @__PURE__ */ new Set(),
|
|
147957
|
-
arg
|
|
147984
|
+
arg,
|
|
147985
|
+
body
|
|
147958
147986
|
)
|
|
147959
147987
|
)
|
|
147960
147988
|
);
|
|
@@ -148142,9 +148170,9 @@ async function definitionsGenerator(config22) {
|
|
|
148142
148170
|
).code;
|
|
148143
148171
|
const typeDefinitions2 = enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map(
|
|
148144
148172
|
(definition) => `
|
|
148145
|
-
export
|
|
148146
|
-
${definition.values?.map((value2) => ` ${value2.name.value}
|
|
148147
|
-
}
|
|
148173
|
+
export const ${definition.name.value} = {
|
|
148174
|
+
${definition.values?.map((value2) => ` ${value2.name.value}: "${value2.name.value}"`).join(",\n")}
|
|
148175
|
+
} as const
|
|
148148
148176
|
`
|
|
148149
148177
|
).join("");
|
|
148150
148178
|
const definitionsIndex = `
|
|
@@ -152634,7 +152662,7 @@ var require_definition3 = __commonJS4({
|
|
|
152634
152662
|
exports.assertInterfaceType = assertInterfaceType;
|
|
152635
152663
|
exports.isUnionType = isUnionType7;
|
|
152636
152664
|
exports.assertUnionType = assertUnionType;
|
|
152637
|
-
exports.isEnumType =
|
|
152665
|
+
exports.isEnumType = isEnumType6;
|
|
152638
152666
|
exports.assertEnumType = assertEnumType;
|
|
152639
152667
|
exports.isInputObjectType = isInputObjectType2;
|
|
152640
152668
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -152705,7 +152733,7 @@ var require_definition3 = __commonJS4({
|
|
|
152705
152733
|
return Constructor;
|
|
152706
152734
|
}
|
|
152707
152735
|
function isType(type) {
|
|
152708
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152736
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type) || isListType3(type) || isNonNullType6(type);
|
|
152709
152737
|
}
|
|
152710
152738
|
function assertType(type) {
|
|
152711
152739
|
if (!isType(type)) {
|
|
@@ -152749,11 +152777,11 @@ var require_definition3 = __commonJS4({
|
|
|
152749
152777
|
}
|
|
152750
152778
|
return type;
|
|
152751
152779
|
}
|
|
152752
|
-
function
|
|
152780
|
+
function isEnumType6(type) {
|
|
152753
152781
|
return (0, _instanceOf.default)(type, GraphQLEnumType);
|
|
152754
152782
|
}
|
|
152755
152783
|
function assertEnumType(type) {
|
|
152756
|
-
if (!
|
|
152784
|
+
if (!isEnumType6(type)) {
|
|
152757
152785
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
152758
152786
|
}
|
|
152759
152787
|
return type;
|
|
@@ -152786,7 +152814,7 @@ var require_definition3 = __commonJS4({
|
|
|
152786
152814
|
return type;
|
|
152787
152815
|
}
|
|
152788
152816
|
function isInputType(type) {
|
|
152789
|
-
return isScalarType7(type) ||
|
|
152817
|
+
return isScalarType7(type) || isEnumType6(type) || isInputObjectType2(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
152790
152818
|
}
|
|
152791
152819
|
function assertInputType(type) {
|
|
152792
152820
|
if (!isInputType(type)) {
|
|
@@ -152795,7 +152823,7 @@ var require_definition3 = __commonJS4({
|
|
|
152795
152823
|
return type;
|
|
152796
152824
|
}
|
|
152797
152825
|
function isOutputType(type) {
|
|
152798
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152826
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
152799
152827
|
}
|
|
152800
152828
|
function assertOutputType(type) {
|
|
152801
152829
|
if (!isOutputType(type)) {
|
|
@@ -152804,7 +152832,7 @@ var require_definition3 = __commonJS4({
|
|
|
152804
152832
|
return type;
|
|
152805
152833
|
}
|
|
152806
152834
|
function isLeafType(type) {
|
|
152807
|
-
return isScalarType7(type) ||
|
|
152835
|
+
return isScalarType7(type) || isEnumType6(type);
|
|
152808
152836
|
}
|
|
152809
152837
|
function assertLeafType(type) {
|
|
152810
152838
|
if (!isLeafType(type)) {
|
|
@@ -152892,7 +152920,7 @@ var require_definition3 = __commonJS4({
|
|
|
152892
152920
|
}
|
|
152893
152921
|
}
|
|
152894
152922
|
function isNamedType(type) {
|
|
152895
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
152923
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type);
|
|
152896
152924
|
}
|
|
152897
152925
|
function assertNamedType(type) {
|
|
152898
152926
|
if (!isNamedType(type)) {
|
|
@@ -211577,7 +211605,7 @@ var require_definition5 = __commonJS5({
|
|
|
211577
211605
|
exports.assertInterfaceType = assertInterfaceType;
|
|
211578
211606
|
exports.isUnionType = isUnionType13;
|
|
211579
211607
|
exports.assertUnionType = assertUnionType;
|
|
211580
|
-
exports.isEnumType =
|
|
211608
|
+
exports.isEnumType = isEnumType11;
|
|
211581
211609
|
exports.assertEnumType = assertEnumType;
|
|
211582
211610
|
exports.isInputObjectType = isInputObjectType8;
|
|
211583
211611
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -211648,7 +211676,7 @@ var require_definition5 = __commonJS5({
|
|
|
211648
211676
|
return Constructor;
|
|
211649
211677
|
}
|
|
211650
211678
|
function isType(type) {
|
|
211651
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211679
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
211652
211680
|
}
|
|
211653
211681
|
function assertType(type) {
|
|
211654
211682
|
if (!isType(type)) {
|
|
@@ -211692,11 +211720,11 @@ var require_definition5 = __commonJS5({
|
|
|
211692
211720
|
}
|
|
211693
211721
|
return type;
|
|
211694
211722
|
}
|
|
211695
|
-
function
|
|
211723
|
+
function isEnumType11(type) {
|
|
211696
211724
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
211697
211725
|
}
|
|
211698
211726
|
function assertEnumType(type) {
|
|
211699
|
-
if (!
|
|
211727
|
+
if (!isEnumType11(type)) {
|
|
211700
211728
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
211701
211729
|
}
|
|
211702
211730
|
return type;
|
|
@@ -211729,7 +211757,7 @@ var require_definition5 = __commonJS5({
|
|
|
211729
211757
|
return type;
|
|
211730
211758
|
}
|
|
211731
211759
|
function isInputType(type) {
|
|
211732
|
-
return isScalarType13(type) ||
|
|
211760
|
+
return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
211733
211761
|
}
|
|
211734
211762
|
function assertInputType(type) {
|
|
211735
211763
|
if (!isInputType(type)) {
|
|
@@ -211738,7 +211766,7 @@ var require_definition5 = __commonJS5({
|
|
|
211738
211766
|
return type;
|
|
211739
211767
|
}
|
|
211740
211768
|
function isOutputType(type) {
|
|
211741
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211769
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
211742
211770
|
}
|
|
211743
211771
|
function assertOutputType(type) {
|
|
211744
211772
|
if (!isOutputType(type)) {
|
|
@@ -211747,7 +211775,7 @@ var require_definition5 = __commonJS5({
|
|
|
211747
211775
|
return type;
|
|
211748
211776
|
}
|
|
211749
211777
|
function isLeafType4(type) {
|
|
211750
|
-
return isScalarType13(type) ||
|
|
211778
|
+
return isScalarType13(type) || isEnumType11(type);
|
|
211751
211779
|
}
|
|
211752
211780
|
function assertLeafType(type) {
|
|
211753
211781
|
if (!isLeafType4(type)) {
|
|
@@ -211835,7 +211863,7 @@ var require_definition5 = __commonJS5({
|
|
|
211835
211863
|
}
|
|
211836
211864
|
}
|
|
211837
211865
|
function isNamedType4(type) {
|
|
211838
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
211866
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
|
|
211839
211867
|
}
|
|
211840
211868
|
function assertNamedType(type) {
|
|
211841
211869
|
if (!isNamedType4(type)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.9",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"recast": "^0.23.1",
|
|
32
32
|
"svelte": "^3.55.0",
|
|
33
33
|
"vite": "^4.0.4",
|
|
34
|
-
"houdini": "^1.0.0-next.
|
|
34
|
+
"houdini": "^1.0.0-next.9"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"graphql": "^14.0.0 || ^15.0.0"
|