File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
FSharp.Data.GraphQL.Server.AspNetCore
FSharp.Data.GraphQL.Server.Giraffe
FSharp.Data.GraphQL.Server.Oxpecker Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ module GraphQLOptionsDefaults =
1515 let [<Literal>] WebSocketEndpoint = " /ws"
1616 let [<Literal>] WebSocketConnectionInitTimeoutInMs = 3000
1717
18+ module GraphQLOptions =
19+
20+ let [<Literal>] IndentedOptionsName = " Indented"
21+
1822type GraphQLTransportWSOptions = {
1923 EndpointUrl : string
2024 ConnectionInitTimeout : TimeSpan
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ module ServiceCollectionExtensions =
7676 member this.Create name = ( getOptions sp)
7777 }
7878 )
79- .Configure< GraphQLOptions< 'Root>>( IndentedOptionsName, ( fun o -> o.SerializerOptions.WriteIndented <- true ))
79+ .Configure< GraphQLOptions< 'Root>>( GraphQLOptions. IndentedOptionsName, ( fun o -> o.SerializerOptions.WriteIndented <- true ))
8080 .AddSingleton< IOptionsFactory< IGraphQLOptions>>( fun sp ->
8181 { new IOptionsFactory< IGraphQLOptions> with
8282 member this.Create name =
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ module HttpHandlers =
4545 let toResponse { DocumentId = documentId ; Content = content ; Metadata = metadata } =
4646
4747 let serializeIndented value =
48- let jsonSerializerOptions = options.Get( IndentedOptionsName) .SerializerOptions
48+ let jsonSerializerOptions = options.Get( GraphQLOptions. IndentedOptionsName) .SerializerOptions
4949 JsonSerializer.Serialize ( value, jsonSerializerOptions)
5050
5151 match content with
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ namespace FSharp.Data.GraphQL.Server.AspNetCore.Giraffe
22
33open System
44open System.IO
5+ open System.Runtime .InteropServices
56open System.Text .Json
67open System.Text .Json .Serialization
78open System.Threading .Tasks
@@ -17,7 +18,6 @@ open FSharp.Data.GraphQL
1718open FSharp.Data .GraphQL .Ast
1819open FSharp.Data .GraphQL .Server
1920open FSharp.Data .GraphQL .Server .AspNetCore
20- open System.Runtime .InteropServices
2121
2222module HttpEndpoints =
2323
@@ -38,7 +38,7 @@ module HttpEndpoints =
3838 let toResponse { DocumentId = documentId ; Content = content ; Metadata = metadata } =
3939
4040 let serializeIndented value =
41- let jsonSerializerOptions = options.Get( IndentedOptionsName) .SerializerOptions
41+ let jsonSerializerOptions = options.Get( GraphQLOptions. IndentedOptionsName) .SerializerOptions
4242 JsonSerializer.Serialize( value, jsonSerializerOptions)
4343
4444 match content with
You can’t perform that action at this time.
0 commit comments