@effect-gql/core 1.4.5 → 1.4.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/builder/index.cjs +152 -38
- package/builder/index.cjs.map +1 -1
- package/builder/index.js +152 -38
- package/builder/index.js.map +1 -1
- package/index.cjs +152 -38
- package/index.cjs.map +1 -1
- package/index.js +152 -38
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -771,26 +771,56 @@ function toGraphQLInputTypeWithRegistry(schema, enumRegistry, inputRegistry, inp
|
|
|
771
771
|
if (memberAst._tag === "UndefinedKeyword") continue;
|
|
772
772
|
const inputName = cache?.astToInputName?.get(memberAst);
|
|
773
773
|
if (inputName) {
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
774
|
+
const inputReg = inputs.get(inputName);
|
|
775
|
+
if (inputReg) {
|
|
776
|
+
return toGraphQLInputTypeWithRegistry(
|
|
777
|
+
inputReg.schema,
|
|
778
|
+
enumRegistry,
|
|
779
|
+
inputRegistry,
|
|
780
|
+
inputs,
|
|
781
|
+
enums,
|
|
782
|
+
cache
|
|
783
|
+
);
|
|
784
|
+
}
|
|
776
785
|
}
|
|
777
|
-
for (const [
|
|
786
|
+
for (const [, inputReg] of inputs) {
|
|
778
787
|
if (inputReg.schema.ast === memberAst) {
|
|
779
|
-
|
|
780
|
-
|
|
788
|
+
return toGraphQLInputTypeWithRegistry(
|
|
789
|
+
inputReg.schema,
|
|
790
|
+
enumRegistry,
|
|
791
|
+
inputRegistry,
|
|
792
|
+
inputs,
|
|
793
|
+
enums,
|
|
794
|
+
cache
|
|
795
|
+
);
|
|
781
796
|
}
|
|
782
797
|
}
|
|
783
798
|
if (memberAst._tag === "Transformation") {
|
|
784
799
|
const innerToAst = memberAst.to;
|
|
785
800
|
const transformedInputName = cache?.astToInputName?.get(innerToAst);
|
|
786
801
|
if (transformedInputName) {
|
|
787
|
-
const
|
|
788
|
-
if (
|
|
802
|
+
const inputReg = inputs.get(transformedInputName);
|
|
803
|
+
if (inputReg) {
|
|
804
|
+
return toGraphQLInputTypeWithRegistry(
|
|
805
|
+
inputReg.schema,
|
|
806
|
+
enumRegistry,
|
|
807
|
+
inputRegistry,
|
|
808
|
+
inputs,
|
|
809
|
+
enums,
|
|
810
|
+
cache
|
|
811
|
+
);
|
|
812
|
+
}
|
|
789
813
|
}
|
|
790
|
-
for (const [
|
|
814
|
+
for (const [, inputReg] of inputs) {
|
|
791
815
|
if (inputReg.schema.ast === innerToAst) {
|
|
792
|
-
|
|
793
|
-
|
|
816
|
+
return toGraphQLInputTypeWithRegistry(
|
|
817
|
+
inputReg.schema,
|
|
818
|
+
enumRegistry,
|
|
819
|
+
inputRegistry,
|
|
820
|
+
inputs,
|
|
821
|
+
enums,
|
|
822
|
+
cache
|
|
823
|
+
);
|
|
794
824
|
}
|
|
795
825
|
}
|
|
796
826
|
}
|
|
@@ -802,25 +832,52 @@ function toGraphQLInputTypeWithRegistry(schema, enumRegistry, inputRegistry, inp
|
|
|
802
832
|
const valueType = valueField.type;
|
|
803
833
|
const valueInputName = cache?.astToInputName?.get(valueType);
|
|
804
834
|
if (valueInputName) {
|
|
805
|
-
const
|
|
806
|
-
if (
|
|
835
|
+
const inputReg = inputs.get(valueInputName);
|
|
836
|
+
if (inputReg) {
|
|
837
|
+
return toGraphQLInputTypeWithRegistry(
|
|
838
|
+
inputReg.schema,
|
|
839
|
+
enumRegistry,
|
|
840
|
+
inputRegistry,
|
|
841
|
+
inputs,
|
|
842
|
+
enums,
|
|
843
|
+
cache
|
|
844
|
+
);
|
|
845
|
+
}
|
|
807
846
|
}
|
|
808
|
-
for (const [
|
|
847
|
+
for (const [, inputReg] of inputs) {
|
|
809
848
|
if (inputReg.schema.ast === valueType) {
|
|
810
|
-
|
|
811
|
-
|
|
849
|
+
return toGraphQLInputTypeWithRegistry(
|
|
850
|
+
inputReg.schema,
|
|
851
|
+
enumRegistry,
|
|
852
|
+
inputRegistry,
|
|
853
|
+
inputs,
|
|
854
|
+
enums,
|
|
855
|
+
cache
|
|
856
|
+
);
|
|
812
857
|
}
|
|
813
858
|
let regAst = inputReg.schema.ast;
|
|
814
859
|
while (regAst._tag === "Transformation") {
|
|
815
860
|
regAst = regAst.to;
|
|
816
861
|
if (regAst === valueType) {
|
|
817
|
-
|
|
818
|
-
|
|
862
|
+
return toGraphQLInputTypeWithRegistry(
|
|
863
|
+
inputReg.schema,
|
|
864
|
+
enumRegistry,
|
|
865
|
+
inputRegistry,
|
|
866
|
+
inputs,
|
|
867
|
+
enums,
|
|
868
|
+
cache
|
|
869
|
+
);
|
|
819
870
|
}
|
|
820
871
|
}
|
|
821
872
|
if (regAst._tag === "Declaration" && regAst.typeParameters?.[0] === valueType) {
|
|
822
|
-
|
|
823
|
-
|
|
873
|
+
return toGraphQLInputTypeWithRegistry(
|
|
874
|
+
inputReg.schema,
|
|
875
|
+
enumRegistry,
|
|
876
|
+
inputRegistry,
|
|
877
|
+
inputs,
|
|
878
|
+
enums,
|
|
879
|
+
cache
|
|
880
|
+
);
|
|
824
881
|
}
|
|
825
882
|
}
|
|
826
883
|
const innerResult = toGraphQLInputTypeWithRegistry(
|
|
@@ -873,26 +930,56 @@ function toGraphQLInputTypeWithRegistry(schema, enumRegistry, inputRegistry, inp
|
|
|
873
930
|
for (const memberAst of unionAst.types) {
|
|
874
931
|
const inputName = cache?.astToInputName?.get(memberAst);
|
|
875
932
|
if (inputName) {
|
|
876
|
-
const
|
|
877
|
-
if (
|
|
933
|
+
const inputReg = inputs.get(inputName);
|
|
934
|
+
if (inputReg) {
|
|
935
|
+
return toGraphQLInputTypeWithRegistry(
|
|
936
|
+
inputReg.schema,
|
|
937
|
+
enumRegistry,
|
|
938
|
+
inputRegistry,
|
|
939
|
+
inputs,
|
|
940
|
+
enums,
|
|
941
|
+
cache
|
|
942
|
+
);
|
|
943
|
+
}
|
|
878
944
|
}
|
|
879
|
-
for (const [
|
|
945
|
+
for (const [, inputReg] of inputs) {
|
|
880
946
|
if (inputReg.schema.ast === memberAst) {
|
|
881
|
-
|
|
882
|
-
|
|
947
|
+
return toGraphQLInputTypeWithRegistry(
|
|
948
|
+
inputReg.schema,
|
|
949
|
+
enumRegistry,
|
|
950
|
+
inputRegistry,
|
|
951
|
+
inputs,
|
|
952
|
+
enums,
|
|
953
|
+
cache
|
|
954
|
+
);
|
|
883
955
|
}
|
|
884
956
|
}
|
|
885
957
|
if (memberAst._tag === "Transformation") {
|
|
886
958
|
const toAst = memberAst.to;
|
|
887
959
|
const transformedInputName = cache?.astToInputName?.get(toAst);
|
|
888
960
|
if (transformedInputName) {
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
961
|
+
const inputReg = inputs.get(transformedInputName);
|
|
962
|
+
if (inputReg) {
|
|
963
|
+
return toGraphQLInputTypeWithRegistry(
|
|
964
|
+
inputReg.schema,
|
|
965
|
+
enumRegistry,
|
|
966
|
+
inputRegistry,
|
|
967
|
+
inputs,
|
|
968
|
+
enums,
|
|
969
|
+
cache
|
|
970
|
+
);
|
|
971
|
+
}
|
|
891
972
|
}
|
|
892
|
-
for (const [
|
|
973
|
+
for (const [, inputReg] of inputs) {
|
|
893
974
|
if (inputReg.schema.ast === toAst) {
|
|
894
|
-
|
|
895
|
-
|
|
975
|
+
return toGraphQLInputTypeWithRegistry(
|
|
976
|
+
inputReg.schema,
|
|
977
|
+
enumRegistry,
|
|
978
|
+
inputRegistry,
|
|
979
|
+
inputs,
|
|
980
|
+
enums,
|
|
981
|
+
cache
|
|
982
|
+
);
|
|
896
983
|
}
|
|
897
984
|
}
|
|
898
985
|
}
|
|
@@ -904,25 +991,52 @@ function toGraphQLInputTypeWithRegistry(schema, enumRegistry, inputRegistry, inp
|
|
|
904
991
|
const valueType = valueField.type;
|
|
905
992
|
const valueInputName = cache?.astToInputName?.get(valueType);
|
|
906
993
|
if (valueInputName) {
|
|
907
|
-
const
|
|
908
|
-
if (
|
|
994
|
+
const inputReg = inputs.get(valueInputName);
|
|
995
|
+
if (inputReg) {
|
|
996
|
+
return toGraphQLInputTypeWithRegistry(
|
|
997
|
+
inputReg.schema,
|
|
998
|
+
enumRegistry,
|
|
999
|
+
inputRegistry,
|
|
1000
|
+
inputs,
|
|
1001
|
+
enums,
|
|
1002
|
+
cache
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
909
1005
|
}
|
|
910
|
-
for (const [
|
|
1006
|
+
for (const [, inputReg] of inputs) {
|
|
911
1007
|
if (inputReg.schema.ast === valueType) {
|
|
912
|
-
|
|
913
|
-
|
|
1008
|
+
return toGraphQLInputTypeWithRegistry(
|
|
1009
|
+
inputReg.schema,
|
|
1010
|
+
enumRegistry,
|
|
1011
|
+
inputRegistry,
|
|
1012
|
+
inputs,
|
|
1013
|
+
enums,
|
|
1014
|
+
cache
|
|
1015
|
+
);
|
|
914
1016
|
}
|
|
915
1017
|
let regAst = inputReg.schema.ast;
|
|
916
1018
|
while (regAst._tag === "Transformation") {
|
|
917
1019
|
regAst = regAst.to;
|
|
918
1020
|
if (regAst === valueType) {
|
|
919
|
-
|
|
920
|
-
|
|
1021
|
+
return toGraphQLInputTypeWithRegistry(
|
|
1022
|
+
inputReg.schema,
|
|
1023
|
+
enumRegistry,
|
|
1024
|
+
inputRegistry,
|
|
1025
|
+
inputs,
|
|
1026
|
+
enums,
|
|
1027
|
+
cache
|
|
1028
|
+
);
|
|
921
1029
|
}
|
|
922
1030
|
}
|
|
923
1031
|
if (regAst._tag === "Declaration" && regAst.typeParameters?.[0] === valueType) {
|
|
924
|
-
|
|
925
|
-
|
|
1032
|
+
return toGraphQLInputTypeWithRegistry(
|
|
1033
|
+
inputReg.schema,
|
|
1034
|
+
enumRegistry,
|
|
1035
|
+
inputRegistry,
|
|
1036
|
+
inputs,
|
|
1037
|
+
enums,
|
|
1038
|
+
cache
|
|
1039
|
+
);
|
|
926
1040
|
}
|
|
927
1041
|
}
|
|
928
1042
|
const innerResult = toGraphQLInputTypeWithRegistry(
|