You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ReflectionHelper.isAssignableWithUnwrap inputDef.Type param.ParameterType then
136
+
all.Add (struct(ValueSome field, param))|> ignore
137
+
else
138
+
// TODO: Consider improving by specifying type mismatches
139
+
mismatch.Add param.Name |> ignore
126
140
| None ->
127
141
if ReflectionHelper.isParameterOptional param then
128
142
all.Add <|struct(ValueNone, param)|> ignore
129
143
else
130
144
missing.Add param.Name |> ignore
131
-
struct(all, areNullable, missing))
132
-
struct(ResizeArray (), HashSet (), HashSet ())
133
-
134
-
if missingParameters.Any ()then
135
-
raise
136
-
<| InvalidInputTypeException (
137
-
$"Input object '%s{objDef.Name}' refers to type '%O{objtype}', but mandatory constructor parameters '%A{missingParameters}' don't match any of the defined input fields",
138
-
missingParameters.ToImmutableHashSet ()
139
-
)
140
-
if nullableMismatchParameters.Any ()then
141
-
raise
142
-
<| InvalidInputTypeException (
143
-
$"Input object %s{objDef.Name} refers to type '%O{objtype}', but optional fields '%A{missingParameters}' are not optional parameters of the constructor",
$"Input object '%s{objDef.Name}' refers to type '%O{objtype}', but mandatory constructor parameters '%A{missingParameters}' don't match any of the defined input fields",
152
+
missingParameters.ToImmutableHashSet ()
153
+
)
154
+
if nullableMismatchParameters.Any ()then
155
+
InvalidInputTypeException (
156
+
$"Input object %s{objDef.Name} refers to type '%O{objtype}', but optional fields '%A{missingParameters}' are not optional parameters of the constructor",
157
+
nullableMismatchParameters.ToImmutableHashSet ()
158
+
)
159
+
if typeMismatchParameters.Any ()then
160
+
InvalidInputTypeException (
161
+
$"Input object %s{objDef.Name} refers to type '%O{objtype}', but fields '%A{typeMismatchParameters}' have different types than constructor parameters",
0 commit comments