From 61e728f3d6e307e3a9baab6643bd19e4bb4d8e29 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 14:26:20 +0000 Subject: [PATCH 1/2] Initial plan From 01eafce86d783869f04e3e17cf283738050faa33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 14:39:12 +0000 Subject: [PATCH 2/2] Fix Long scalar inline integer validation and add regression test Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/63f68819-566d-4fd8-b346-9f4ea5c8f2c9 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com> --- src/FSharp.Data.GraphQL.Shared/Validation.fs | 2 +- tests/FSharp.Data.GraphQL.Tests/AstValidationTests.fs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/FSharp.Data.GraphQL.Shared/Validation.fs b/src/FSharp.Data.GraphQL.Shared/Validation.fs index 4a241a9b8..cf795c677 100644 --- a/src/FSharp.Data.GraphQL.Shared/Validation.fs +++ b/src/FSharp.Data.GraphQL.Shared/Validation.fs @@ -920,7 +920,7 @@ module Ast = | _ when tref.Kind = TypeKind.NON_NULL -> checkIsCoercible tref.OfType.Value argName value | IntValue _ -> match tref.Name, tref.Kind with - | Some ("ID" | "Int" | "Float"), TypeKind.SCALAR -> Success + | Some ("ID" | "Int" | "Long" | "Float"), TypeKind.SCALAR -> Success | _ -> canNotCoerce | FloatValue _ -> match tref.Name, tref.Kind with diff --git a/tests/FSharp.Data.GraphQL.Tests/AstValidationTests.fs b/tests/FSharp.Data.GraphQL.Tests/AstValidationTests.fs index 7cde89879..a5dd095cf 100644 --- a/tests/FSharp.Data.GraphQL.Tests/AstValidationTests.fs +++ b/tests/FSharp.Data.GraphQL.Tests/AstValidationTests.fs @@ -219,6 +219,12 @@ let Arguments = [ Define.Input ("intArg", Nullable IntType) ], (fun ctx _ -> ctx.Arg ("intArg")) ) + Define.Field ( + "longArgField", + Nullable LongType, + [ Define.Input ("longArg", Nullable LongType) ], + (fun ctx _ -> ctx.Arg ("longArg")) + ) Define.Field ( "nonNullBooleanListField", ListOf BooleanType, @@ -1020,6 +1026,10 @@ fragment coercedIntIntoFloatArg on Arguments { floatArgField(floatArg: 123) } +fragment coercedIntIntoLongArg on Arguments { + longArgField(longArg: 123) +} + query goodComplexDefaultValue($search: ComplexInput = { name: "Fido" }) { findDog(complex: $search) }"""