File tree 1 file changed +13
-0
lines changed
src/FSharp.Data.GraphQL.Server
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,19 @@ let rec internal compileByType
205
205
| None ->
206
206
Ok
207
207
<| wrapOptionalNone param.ParameterType field.TypeDef.Type
208
+ | Some input when isNull ( box field.ExecuteInput) ->
209
+ // hack around the case where field.ExecuteInput is null
210
+ let rec extract = function
211
+ | NullValue -> null
212
+ | IntValue i -> box i
213
+ | FloatValue f -> box f
214
+ | BooleanValue b -> box b
215
+ | StringValue s -> box s
216
+ | EnumValue e -> box e
217
+ | ListValue l -> box ( l |> List.map extract)
218
+ | ObjectValue o -> o |> Map.map ( fun k v -> extract v) |> box
219
+ | VariableName v -> failwithf " Todo: extract variable"
220
+ extract input |> Ok
208
221
| Some prop ->
209
222
field.ExecuteInput prop variables
210
223
|> Result.map ( normalizeOptional param.ParameterType)
You can’t perform that action at this time.
0 commit comments