Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
66b743b
Migrate integration tests to in-process hosts via `WebApplicationFact…
Copilot May 17, 2026
1506a22
Enforce input/output kind safety for `ListOf`/`Nullable` wrappers at …
Copilot May 17, 2026
075018b
Pin CI workflows and build script to .NET SDK 10.0.300 (#578)
Copilot May 17, 2026
19d11c3
Pin CI workflows and build script to .NET SDK 10.0.301
xperiandri Jun 13, 2026
cc5fc0f
Fixed Repo Assist incorrectly encoded characters
xperiandri Jun 13, 2026
50b4569
Bump lodash and babel-cli in /samples/graphiql-client (#584)
dependabot[bot] Jun 13, 2026
d8aba70
Publish CI test results into PR discussions, harden artifact download…
Copilot Jun 13, 2026
45046d7
Fixed NuGet packaging of DesignTime DLL for F# provider
xperiandri Jun 13, 2026
e643b8d
Updated `FSharp.TypeProviders.SDK` to `8.10.0`
xperiandri Jun 13, 2026
bdd7297
fixup! Updated `FSharp.TypeProviders.SDK` to `8.10.0`
xperiandri Jun 14, 2026
15df50a
High severity vulnerability fix: upgrade `SQLitePCLRaw.lib.e_sqlite3`…
Copilot Jul 8, 2026
c1e8510
Support case-insensitive comparison with `ObjectListFilter` (#582)
Copilot Jul 9, 2026
2d94c67
`ObjectListFilter` filter values to target type coercion (#589)
xperiandri Jul 9, 2026
454a9e0
Migrated to modern `InternalsVisibleTo` syntax
xperiandri Jul 16, 2026
8e34237
Implemented support of `Guid` and value object scalars as `InputValue`
xperiandri Jul 17, 2026
78d21c1
Implemented tests for `ObjectListFilter` with empty arrays
xperiandri Aug 9, 2026
060fd26
Updated SDK to `10.0.302`
xperiandri Aug 9, 2026
d971701
Updated `Fantomas` to `7.0.5`
xperiandri Aug 9, 2026
eada5c2
Updated `FSDocs-Tools` to `22.1.0`
xperiandri Aug 9, 2026
b9ce3ad
Implemented robust interface field covariance validation & tests
xperiandri Aug 9, 2026
be74f88
Bump @protobufjs/utf8 from 1.1.0 to 1.1.1 in /samples/client-provider…
dependabot[bot] Aug 9, 2026
c072f8e
Bump brace-expansion from 1.1.14 to 1.1.18 in /samples/graphiql-clien…
dependabot[bot] Aug 10, 2026
f640cdd
Use deterministic SHA-256 based documentId generation
Copilot May 17, 2026
2a8e1f9
Update introspection fixture documentId values
Copilot May 17, 2026
74d522b
Address review feedback on deterministic documentId changes
Copilot May 17, 2026
bc5e2c4
Document expected deterministic documentId in test
Copilot May 17, 2026
bc49f5d
Clarify hash truncation and expected documentId derivation
Copilot May 17, 2026
7266a62
Refine hash span usage and test value explanation
Copilot May 17, 2026
a9de885
Address review feedback on literals and documentId hashing
Copilot May 17, 2026
e9281f7
Switch documentId to deterministic SHA-256 string
Copilot May 17, 2026
892130c
Apply follow-up review suggestions
Copilot May 17, 2026
77f42d0
Fixed ReadMe
xperiandri May 17, 2026
85cc833
Use ValidationResultKey directly in cache instead of GetHashCode()
Copilot May 17, 2026
12845a6
Make SchemaId deterministic using SHA-256 hash of introspection schem…
Copilot May 17, 2026
72a71df
Apply code review feedback: use uppercase hex for Unicode escapes and…
Copilot May 17, 2026
4566f37
Optimize: cache JsonSerializerOptions and reduce StringBuilder overhead
Copilot May 17, 2026
f092046
Minor optimization: avoid sprintf in character loop for better perfor…
Copilot May 17, 2026
29a7eb4
Fix trailing whitespace in string escaping code
Copilot May 17, 2026
632c8c9
Ensure deterministic JSON serialization and use lowercase hex for Uni…
Copilot May 17, 2026
aaf216e
Add documentation for UnsafeRelaxedJsonEscaping usage and SHA256 inst…
Copilot May 17, 2026
7de7fbf
Optimize SchemaId serialization and improve code formatting
Copilot May 17, 2026
06212d5
Add comprehensive test coverage for documentId and validation cache
Copilot May 17, 2026
5962d18
AI review fix
xperiandri May 17, 2026
6da8d6d
Cache schema ID at Executor level to avoid recomputing on every request
Copilot May 17, 2026
e726cff
Fix schema ID computation to run after middleware compilation
Copilot May 17, 2026
4921bf2
Add comprehensive test coverage for ToQueryString string escaping
Copilot May 17, 2026
b9e55fa
Simplify SchemaId generation to use GetHashCode
Copilot May 17, 2026
3db55a2
Clarify SchemaId GetHashCode scope in XML docs
Copilot May 17, 2026
a7de093
Change validation SchemaId type to int
Copilot May 17, 2026
c5fbaf8
Remove unnecessary SchemaId helper module
Copilot May 17, 2026
a963959
Formatted changed files
xperiandri May 18, 2026
73f394f
Escape U+2028/U+2029 in ToQueryString and add regression tests
Copilot May 18, 2026
3a85fd8
Made `ExecutionTests` asynchronous
xperiandri May 18, 2026
de8621b
Fixed comments
xperiandri May 18, 2026
1b33a38
Removed unnecessary test
xperiandri May 18, 2026
c3eb6a9
Make concurrent cache test actually run in parallel
Copilot May 18, 2026
71891c1
Rename worker readiness gate in concurrent cache test
Copilot May 18, 2026
6a1e518
Fix cross-platform documentId hashing and AstExtensions List.choose
Copilot May 18, 2026
08d0f90
Improved query normalization
xperiandri May 18, 2026
30bdf0c
Simplified cache test
xperiandri May 18, 2026
e3dc5c4
Execution plan cache fix
xperiandri May 18, 2026
5393fd9
Fix escaped-string documentId test to execute valid argument path
Copilot May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "7.0.1",
"version": "7.0.5",
"commands": [
"fantomas"
],
"rollForward": false
},
"fsdocs-tool": {
"version": "20.0.1",
"version": "22.1.0",
"commands": [
"fsdocs"
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DOTNET_SDK_VERSION: 10.0.202
DOTNET_SDK_VERSION: 10.0.302

jobs:
publish:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
SLEEP_DURATION: 60
DOTNET_SDK_VERSION: 10.0.202
DOTNET_SDK_VERSION: 10.0.302

jobs:
publish:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Test Results

on:
workflow_run:
workflows: ["Build and Test"]
types:
- completed

permissions: {}

jobs:
test-results:
if: github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.event == 'pull_request'
name: Test Results
runs-on: ubuntu-latest

permissions:
actions: read
checks: write
pull-requests: write

steps:
- name: Download event file
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
name: EventFile

- name: Download test results
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}
path: test-results
name: ^test-results-.*
name_is_regexp: true
if_no_artifact_found: warn

- name: Resolve event file path
id: event_file
shell: pwsh
run: |
$eventFilePath =
Get-ChildItem -Path artifacts -Filter event.json -Recurse |
Select-Object -First 1 -ExpandProperty FullName

if ($null -eq $eventFilePath) {
throw "event.json file was not found in downloaded artifacts"
}

"path=$eventFilePath" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append

- name: Publish test results
if: ${{ hashFiles('test-results/**/*.trx') != '' }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
comment_mode: always
event_file: ${{ steps.event_file.outputs.path }}
event_name: ${{ github.event.workflow_run.event }}
files: "test-results/**/*.trx"
26 changes: 25 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,31 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

permissions: {}

jobs:
event_file:
if: github.event_name == 'pull_request'
name: Publish event file
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Upload event file
uses: actions/upload-artifact@v4
with:
name: EventFile
path: ${{ github.event_path }}

build:
permissions:
contents: read

strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macOS-latest]
dotnet: [10.0.202]
dotnet: [10.0.302]
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -50,3 +67,10 @@ jobs:

- name: Build and run integration tests
run: dotnet run --project build/Build.fsproj --launch-profile BuildAndTest

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: test-results
103 changes: 54 additions & 49 deletions .github/workflows/repo-assist.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions FSharp.Data.GraphQL.Integration.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Folder Name="/samples/">
<Project Path="samples/star-wars-api/star-wars-api.fsproj" />
</Folder>
<Folder Name="/Solution Items/">
<File Path="Directory.Build.props" />
<File Path="Directory.Build.targets" />
Expand All @@ -12,7 +15,9 @@
<Folder Name="/src/">
<Project Path="src/FSharp.Data.GraphQL.Server.AspNetCore/FSharp.Data.GraphQL.Server.AspNetCore.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Server.Giraffe/FSharp.Data.GraphQL.Server.Giraffe.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Server.Middleware/FSharp.Data.GraphQL.Server.Middleware.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Server.Oxpecker/FSharp.Data.GraphQL.Server.Oxpecker.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Server.Relay/FSharp.Data.GraphQL.Server.Relay.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Server/FSharp.Data.GraphQL.Server.fsproj" />
<Project Path="src/FSharp.Data.GraphQL.Shared/FSharp.Data.GraphQL.Shared.fsproj" />
</Folder>
Expand Down
3 changes: 3 additions & 0 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</PackageReference>
<PackageReference Update="FSharp.Control.FusionTasks" Version="2.6.*" />
<PackageReference Update="FSharp.Control.Reactive" Version="6.*" />
<PackageReference Update="FSharp.Data.LiteralProviders" Version="1.0.3" />
<PackageReference Update="FSharp.SystemTextJson" Version="1.*" />
<PackageReference Update="FsToolkit.ErrorHandling" Version="$(FsToolkitVersion)" />
<PackageReference Update="FsToolkit.ErrorHandling.TaskResult" Version="$(FsToolkitVersion)" />
Expand Down Expand Up @@ -76,9 +77,11 @@
<PackageReference Update="GraphQL.Server.Ui.Voyager" Version="8.*" />
<PackageReference Update="HotChocolate.AspNetCore" Version="15.*" />
<PackageReference Update="Iced" Version="1.17.*" />
<PackageReference Update="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.Azure.Cosmos" Version="3.*" />
<PackageReference Update="Microsoft.CodeCoverage" Version="17.3.*" />
<PackageReference Update="Microsoft.Data.Sqlite" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Update="SQLitePCLRaw.lib.e_sqlite3" Version="3.53.3" />
<PackageReference Update="Microsoft.Diagnostics.NETCore.Client" Version="0.2.*" />
<PackageReference Update="Microsoft.Diagnostics.Runtime" Version="2.2.*" />
<PackageReference Update="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.*" />
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ printfn "Custom data: %A\n" result.CustomData

// Errors: <null>

// Custom data: map [("documentId", 1221427401)]
// Custom data: map [("documentId", "<SHA-256 of the executed query document>")]
```

For more information about how to use the client provider, see the [examples folder](samples/client-provider).
Expand Down Expand Up @@ -361,6 +361,8 @@ query TestQuery {
}
```

For string filters, lowercase suffixes are case-insensitive (`name_starts_with`, `name_sw`, `name_contains`, `name_equals`, `name_eq`), while capitalized suffixes are case-sensitive (`name_Starts_With`, `name_SW`, `name_Contains`, `name_Equals`, `name_EQ`). `contains`/`Contains` do not have shorthand aliases.

Also you can apply `not` operator like this:

```graphql
Expand Down Expand Up @@ -406,12 +408,16 @@ type ObjectListFilter =
| And of ObjectListFilter * ObjectListFilter
| Or of ObjectListFilter * ObjectListFilter
| Not of ObjectListFilter
| Equals of FieldFilter<System.IComparable>
| Equals of Filter : FieldFilter<System.IComparable> * Comparer : System.Collections.IComparer
| GreaterThan of FieldFilter<System.IComparable>
| GreaterThanOrEqual of FieldFilter<System.IComparable>
| LessThan of FieldFilter<System.IComparable>
| StartsWith of FieldFilter<string>
| EndsWith of FieldFilter<string>
| Contains of FieldFilter<string>
| LessThanOrEqual of FieldFilter<System.IComparable>
| In of FieldFilter<obj list>
| StartsWith of Filter : FieldFilter<string> * Comparer : System.StringComparer
| EndsWith of Filter : FieldFilter<string> * Comparer : System.StringComparer
| Contains of Filter : FieldFilter<System.IComparable> * Comparer : System.Collections.IComparer
| OfTypes of System.Type list
| FilterField of FieldFilter<ObjectListFilter>
```

Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,5 @@

* **Breaking Change** Migrated to .NET 10
* **Breaking Change** Made Relay `Edge` a read-only struct
* Added case-insensitive string comparison support to `ObjectListFilter`, including comparer-aware filter cases and GraphQL filter suffix handling
* Improved Relay XML documentation comments
113 changes: 43 additions & 70 deletions build/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module Program

open System
open System.IO
open System.Net.Http
open System.Text.Json

open Fake.Core
open Fake.Core.TargetOperators
Expand Down Expand Up @@ -32,7 +30,7 @@ let ctx = Context.forceFakeContext ()
let embedAll = ctx.Arguments |> List.exists (fun arg -> arg = BuildArguments.EmbedAll)

module DotNetCli =
let setVersion (o : DotNet.Options) = { o with Version = Some "10.0.202" }
let setVersion (o : DotNet.Options) = { o with Version = Some "10.0.302" }
let setRestoreOptions (o : DotNet.RestoreOptions) = o.WithCommon setVersion

let configurationString = Environment.environVarOrDefault "CONFIGURATION" "Release"
Expand Down Expand Up @@ -100,12 +98,17 @@ let startGraphQLServer (project : string) port (streamRef : DataRef<Stream>) =

System.Threading.Thread.Sleep (2000)

let runTests (project : string) (args : string) =
let runTests (project : string) =
let projectName = Path.GetFileNameWithoutExtension project
let resultsFileName = $"{projectName}.trx"

DotNet.test
(fun options ->
{
options with
NoBuild = true
Logger = Some $"trx;LogFileName={resultsFileName}"
ResultsDirectory = Some "test-results"
Framework = Some DotNetMoniker
Configuration = configuration
MSBuildParams = {
Expand All @@ -123,26 +126,6 @@ let runTests (project : string) (args : string) =
|> _.WithCommon(DotNetCli.setVersion))
project

let starWarsServerStream = StreamRef.Empty

let [<Literal>] StartStarWarsServerTarget = "StartStarWarsServer"
Target.create StartStarWarsServerTarget <| fun _ ->
Target.activateFinal "StopStarWarsServer"

let project =
"samples"
</> "star-wars-api"
</> "star-wars-api.fsproj"

startGraphQLServer project 8086 starWarsServerStream

let [<Literal>] StopStarWarsServerTarget = "StopStarWarsServer"
Target.createFinal StopStarWarsServerTarget <| fun _ ->
try
starWarsServerStream.Value.Write ([| 0uy |], 0, 1)
with e ->
printfn "%s" e.Message

let integrationTestServerProjectPath =
"tests"
</> "FSharp.Data.GraphQL.IntegrationTests.Server"
Expand Down Expand Up @@ -179,57 +162,52 @@ Target.createFinal StopIntegrationServerTarget <| fun _ ->
with e ->
printfn "%s" e.Message

let integrationTestsProjectPath =
"tests"
</> "FSharp.Data.GraphQL.IntegrationTests"
</> "FSharp.Data.GraphQL.IntegrationTests.fsproj"

let [<Literal>] UpdateIntrospectionFileTarget = "UpdateIntrospectionFile"
Target.create UpdateIntrospectionFileTarget <| fun _ ->
let client = new HttpClient ()
(task {
let! result = client.GetAsync ("http://localhost:8086")
let! contentStream = result.Content.ReadAsStreamAsync ()
let! jsonDocument = JsonDocument.ParseAsync contentStream
let file =
new FileStream ("tests/FSharp.Data.GraphQL.IntegrationTests/introspection.json", FileMode.Create, FileAccess.Write, FileShare.None)
let encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping
let jsonWriterOptions = JsonWriterOptions (Indented = true, Encoder = encoder)
let writer = new Utf8JsonWriter (file, jsonWriterOptions)
jsonDocument.WriteTo writer
do! writer.FlushAsync ()
do! writer.DisposeAsync ()
do! file.DisposeAsync ()
result.Dispose ()
})
.Wait ()
client.Dispose ()
let projectName = Path.GetFileNameWithoutExtension integrationTestsProjectPath
let resultsFileName = $"{projectName}.trx"

DotNet.test
(fun options ->
{
options with
NoBuild = true
Logger = Some $"trx;LogFileName={resultsFileName}"
ResultsDirectory = Some "test-results"
Framework = Some DotNetMoniker
Configuration = configuration
Common = {
options.Common with
CustomParams = Some "--filter FullyQualifiedName~IntrospectionUpdateTests"
}
MSBuildParams = {
options.MSBuildParams with
DisableInternalBinLog = true
Verbosity = Some Normal
Properties = [
if embedAll then
("DebugType", "embedded")
("EmbedAllSources", "true")
]
}
}
|> _.WithRedirectOutput(true)
|> _.WithCommon(DotNetCli.setVersion))
integrationTestsProjectPath

let unitTestsProjectPath =
"tests"
</> "FSharp.Data.GraphQL.Tests"
</> "FSharp.Data.GraphQL.Tests.fsproj"

let integrationTestsProjectPath =
"tests"
</> "FSharp.Data.GraphQL.IntegrationTests"
</> "FSharp.Data.GraphQL.IntegrationTests.fsproj"

let [<Literal>] BuildIntegrationTestsTarget = "BuildIntegrationTests"
Target.create BuildIntegrationTestsTarget <| fun _ ->
integrationTestsProjectPath
|> DotNet.build (fun options -> {
options with
Configuration = configuration
MSBuildParams = {
options.MSBuildParams with
DisableInternalBinLog = true
}
Common = DotNetCli.setVersion options.Common
})

let [<Literal>] RunUnitTestsTarget = "RunUnitTests"
Target.create RunUnitTestsTarget <| fun _ ->
runTests unitTestsProjectPath ""

let [<Literal>] RunIntegrationTestsTarget = "RunIntegrationTests"
Target.create RunIntegrationTestsTarget <| fun _ ->
runTests integrationTestsProjectPath "" //"--filter Execution=Sync"
runTests unitTestsProjectPath

let prepareDocGen () =
Shell.rm "docs/release-notes.md"
Expand Down Expand Up @@ -406,12 +384,7 @@ Target.create "PackAndPush" ignore
==> RestoreTarget
==> BuildTarget
==> RunUnitTestsTarget
==> StartStarWarsServerTarget
==> BuildIntegrationTestServerTarget
==> StartIntegrationServerTarget
==> UpdateIntrospectionFileTarget
==> BuildIntegrationTestsTarget
==> RunIntegrationTestsTarget
==> "All"
=?> (GenerateDocsTarget, Environment.environVar "GITHUB_ACTIONS" = "True")
|> ignore
Expand Down
Loading
Loading