File tree 1 file changed +5
-4
lines changed
src/FSharp.Data.GraphQL.Shared
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -294,17 +294,18 @@ module SchemaDefinitions =
294
294
295
295
/// Tries to resolve AST query input to URI.
296
296
let coerceUriInput =
297
+ let destinationType = " URI"
297
298
function
298
299
| Variable e when e.ValueKind = JsonValueKind.String ->
299
300
match Uri.TryCreate( e.GetString(), UriKind.RelativeOrAbsolute) with
300
301
| true , uri -> Ok uri
301
- | false , _ -> Error [{ new IGQLError with member _.Message = $ " Cannot deserialize '{e.GetRawText()}' into URI " }]
302
- | Variable e -> e.GetDeserializeError " URI "
302
+ | false , _ -> e.GetDeserializeError destinationType
303
+ | Variable e -> e.GetDeserializeError destinationType
303
304
| InlineConstant ( StringValue s) ->
304
305
match Uri.TryCreate( s, UriKind.RelativeOrAbsolute) with
305
306
| true , uri -> Ok uri
306
- | false , _ -> Error [{ new IGQLError with member _.Message = $ " Cannot parse '{s}' into URI " }]
307
- | InlineConstant value -> value.GetCoerceError " URI "
307
+ | false , _ -> getParseError destinationType s
308
+ | InlineConstant value -> value.GetCoerceError destinationType
308
309
309
310
/// Tries to resolve AST query input to DateTimeOffset.
310
311
let coerceDateTimeOffsetInput =
You can’t perform that action at this time.
0 commit comments