@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/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 result = inputRegistry.get(inputName);
775
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
786
+ for (const [, inputReg] of inputs) {
778
787
  if (inputReg.schema.ast === memberAst) {
779
- const result = inputRegistry.get(regInputName);
780
- if (result) return result;
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 result = inputRegistry.get(transformedInputName);
788
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
814
+ for (const [, inputReg] of inputs) {
791
815
  if (inputReg.schema.ast === innerToAst) {
792
- const result = inputRegistry.get(regInputName);
793
- if (result) return result;
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 result = inputRegistry.get(valueInputName);
806
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
847
+ for (const [, inputReg] of inputs) {
809
848
  if (inputReg.schema.ast === valueType) {
810
- const result = inputRegistry.get(regInputName);
811
- if (result) return result;
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
- const result = inputRegistry.get(regInputName);
818
- if (result) return result;
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
- const result = inputRegistry.get(regInputName);
823
- if (result) return result;
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 result = inputRegistry.get(inputName);
877
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
945
+ for (const [, inputReg] of inputs) {
880
946
  if (inputReg.schema.ast === memberAst) {
881
- const result = inputRegistry.get(regInputName);
882
- if (result) return result;
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 result = inputRegistry.get(transformedInputName);
890
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
973
+ for (const [, inputReg] of inputs) {
893
974
  if (inputReg.schema.ast === toAst) {
894
- const result = inputRegistry.get(regInputName);
895
- if (result) return result;
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 result = inputRegistry.get(valueInputName);
908
- if (result) return result;
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 [regInputName, inputReg] of inputs) {
1006
+ for (const [, inputReg] of inputs) {
911
1007
  if (inputReg.schema.ast === valueType) {
912
- const result = inputRegistry.get(regInputName);
913
- if (result) return result;
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
- const result = inputRegistry.get(regInputName);
920
- if (result) return result;
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
- const result = inputRegistry.get(regInputName);
925
- if (result) return result;
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(